Sources: auto choose .ogg or .webm?

2 posts, 0 answers
  1. Kevin F
    Kevin F avatar
    70 posts
    Member since:
    Sep 2009

    Posted 29 Jun 2018 Link to this post

    If I have a video in only two formats (ogg and webm), can I add both as sources and have the media player automatically detect which one to use?  Or do I need to do the necessary browser checks before adding the source to the player?

  2. Georgi
    Georgi avatar
    647 posts

    Posted 03 Jul 2018 Link to this post

    Hello Kevin,

    Possible solution is to append all the sources to the generated video tag using jQuery after the widget is initialized.


    var vid = $('#mediaplayer video');
          vid.append('<source src="" />');
          vid.append('<source src="" />');

    Below you will find a small sample which demonstrates the above approach:

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top