Steam trailers
Opened this issue · 0 comments
cristianocang commented
Hi,
I'd like to ask for a feature: is it possible add an option display the trailer videos on Steam pages in HTML5 instead of the default Flash player?
As now, the code looks like this:
<script type="text/javascript">
var strRequiredVersion = "9";
if ( typeof( g_bIsOnMac ) != 'undefined' && g_bIsOnMac )
strRequiredVersion = "10.1.0";
var bShouldUseHTML5 = !swfobject.hasFlashPlayerVersion(strRequiredVersion) || BDoesUserPreferHTML5();
</script>
<div class="block_content" id="game_highlights">
<div class="leftcol">
<div class="highlight_ctn">
<div class="highlight_overflow">
<div id="highlight_player_area" >
<div class="highlight_player_item highlight_movie" id="highlight_movie_2030221" style="display: none;">
<script type="text/javascript">
if( bShouldUseHTML5 )
{
document.write('<video class="highlight_player_item highlight_movie" src="http://media3.steampowered.com/steam/apps/2030221/movie480.webm?t=1395149987" data-hd-src="http://media3.steampowered.com/steam/apps/2030221/movie_max.webm?t=1395149987" poster="http://cdn4.steampowered.com/v/gfx/apps/2030221/movie.293x165.jpg?t=1395149987" id="movie_2030221" ><p>Você precisará <a href="http://www.adobe.com/go/getflashplayer" target="_blank">instalar</a> o último plugin Flash para visualizar esta página apropriadamente.</p></video>');
jQuery("#movie_2030221").videoControls();
}
else
document.write('<div id="movie_2030221" class="highlight_flash_player_notice" style="display: none;"><p>Você precisará <a href="http://www.adobe.com/go/getflashplayer" target="_blank">instalar</a> o último plugin Flash para visualizar esta página apropriadamente.</p></div>');
</script>
So it seems it's just a matter of setting the BDoesUserPreferHTML5 cookie as "true", I guess.