Sha256: 164c36837f1bbc8a78b1df2544bc1db469889613a2aa478d48be218b86b52779
Contents?: true
Size: 839 Bytes
Versions: 32
Compression:
Stored size: 839 Bytes
Contents
pageflow.VideoPlayer.filterSources = function(playerElement) { if (!$(playerElement).is('video')) { return playerElement; } var changed = false; if (pageflow.browser.has('mp4 support only')) { // keep only mp4 source $(playerElement).find('source').not('source[type="video/mp4"]').remove(); changed = true; } else if (pageflow.browser.has('mse and native hls support')) { // remove dash source to ensure hls is used $(playerElement).find('source[type="application/dash+xml"]').remove(); changed = true; } if (changed) { // the video tags initially in the dom are broken since they "saw" // the other sources. replace with clones var clone = $(playerElement).clone(true); $(playerElement).replaceWith(clone); return clone[0]; } else { return playerElement; } };
Version data entries
32 entries across 32 versions & 1 rubygems