Note that there are some explanatory texts on larger screens.

plurals
  1. POvideo js ie9 multiple urls on one page
    primarykey
    data
    text
    <p>I have an object of video urls like so:</p> <pre><code> var urls = new Object(); urls['cail_ivt'] = {'mp4_url': http://link_to_.mp4', 'webm_url': 'http://link_to_.webm', 'flv_url': 'http://link_to_.flv' }; urls['cail_ty'] = {'mp4_url': 'http://link_to_.mp4', 'webm_url': 'http://link_to_.webm', 'flv_url': 'http://link_to_.flv' }; urls['cail_1'] = {'mp4_url': 'http://link_to_.mp4', 'webm_url': 'http://link_to_.webm', 'flv_url': 'http://link_to_.flv' }; urls['cail_2'] = {'mp4_url': 'http://link_to_.mp4', 'webm_url': 'http://link_to_.webm', 'flv_url': 'http://link_to_.flv' }; urls['cail_3'] = {'mp4_url': 'http://link_to_.mp4', 'webm_url': 'http://link_to_.webm', 'flv_url': 'http://link_to_.flv' }; _V_.options.flash.swf = 'http://static_server/video-js.swf'; </code></pre> <p>I have a bunch of anchor tags who's id is the key to the urls object:</p> <p>I then wrote a little js to bind those anchor clicks and load the appropriate video into the player div and display it. It never displays and doesn't play. This only seems to happen in ie9.</p> <pre><code> $('ul a.play_button').click(function() { var campaign_id = $(this).attr('id'); var mp4_url = urls[campaign_id].mp4_url; var webm_url = urls[campaign_id].webm_url; var flv_url = urls[campaign_id].flv_url; var video_player = '&lt;video id="video" class="video-js vjs-default-skin" controls preload="none" width="640" height="360" poster="" data-setup="{}"&gt; ' + '&lt;source id="mp4" src="'+mp4_url+'" type="video/mp4" /&gt;' + '&lt;source id="flash" src="'+flv_url+'" type="video/flv" /&gt;' + '&lt;source id="webm" src="'+webm_url+'" type="video/webm" /&gt;' + '&lt;/video&gt;'; $('#player').empty(); $('#player').html(video_player); }); </code></pre> <p>Not sure if this is the best way to handle multiple videos in a player but it's what I came up with. Discussion and help greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload