This is a migrated thread and some comments may be shown as answers.

Base HTML5 Player features?

6 Answers 51 Views
MediaPlayer
This is a migrated thread and some comments may be shown as answers.
Brian Azzi
Top achievements
Rank 2
Brian Azzi asked on 28 Jan 2014, 08:57 PM
Hello... does the MediaPlayer support the native underlying HTML5 video tag properties / methods?

In particular, I am interested in playing a video with multiple audio tracks. The HTML5 spec outlines this (via audioTrackList), but it seems to be only implemented by IE 10/11 at the moment. In IE 10 or 11, if you load a video with multiple audio tracks, you get an audio selection menu / toolbar item. I don't specifically need this toolbar item, but I would like to be able to a) see if there are multiple audio tracks, and b) programmatic-ally set which one to play.

Thanks,
-Brian

6 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 31 Jan 2014, 09:50 AM
Hello Brian,

Unfortunately the RadMediaPlyer does not wrap audioTrackList functionality. However you can log the audioTrackList as a feature request into our public portal. Thus other users can see it and they can vote for it. The public portal can be found here: http://feedback.telerik.com/Project/108
Also all available properties and methods of the RadMediaPlayer can be fond here:
http://www.telerik.com/help/aspnet-ajax/mediaplayer-client-side-basics.html
Additionally if you need some specific method or property from the video or audio elements you can get them via client side $find("RadMediaPlayer1").currentPlayer.media property of the player which contains video or audio element.  

Regards,
Radoslav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Brian Azzi
Top achievements
Rank 2
answered on 31 Jan 2014, 06:20 PM
Thanks for the reply... that's actually very helpful that the base video element is exposed that way! (Some other HTML5 wrappers do not properly expose the element, and I can't get at the media.audioTracks property in IE... which allows setting & retrieving the audio tracks). 

Is there a good way to add elements to the toolbar (custom button for example)? it would be nice to have my UI modifications in the player controls area instead of a separate area so that they would be visible in full screen mode / etc.

Thanks again, good tip.
0
Radoslav
Telerik team
answered on 04 Feb 2014, 08:56 AM
Hello Brian,

Unfortunately we do not have built in functionality into the RadMediaPlayer control for inserting additional elements into its toolbars. You can get the toolbar wrapper element with following code
$find("RadMediaPlayer1").toolbar.get_wrapper()
and manually to insert elements with javascript. However please note that in this case new elements can broke the toolbar visually because it is not designed to have additional elements. 

If you need further assistance, do not hesitate to contact us again.

Regards,
Radoslav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Brian Azzi
Top achievements
Rank 2
answered on 05 Feb 2014, 04:02 PM
One more quick question... how do I access / enable closed captioning via the HTML5 tracks? (I have a caption file). Do I set this up as a separate RadMediaSource? Is there a better way to access the markup for the underlying HTML5 player?
0
Brian Azzi
Top achievements
Rank 2
answered on 05 Feb 2014, 08:08 PM
In regard to my above post... I found a way to at least enable captions (though it seems like a bit of a hack). In script, I get the player media element, then modify the innerHTML manually to add the caption track XML.

media.innerHTML += '<track label="English Captions" srclang="en" kind="captions" src="URL HERE TO.vtt" type="text/vtt" default />';

Obviously, there is no Telerik UI CC button (unfortunate)... so I'd have to create my own UI button... again, leading me to the whole question about "full screen" and the controls.
0
Radoslav
Telerik team
answered on 07 Feb 2014, 08:16 AM
Hi Brian,

Unfortunately we do not have Closed Caption button into the MediaPlayer. However as I said in my previous post you can log this as a feature request here:
http://feedback.telerik.com/Project/108
If it appears to be a common request and attainable enhancement, you may see it included in a future version of the product.

If you need further assistance, do not hesitate to contact us again.

Regards,
Radoslav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
MediaPlayer
Asked by
Brian Azzi
Top achievements
Rank 2
Answers by
Radoslav
Telerik team
Brian Azzi
Top achievements
Rank 2
Share this question
or