added 7 flashvar parameters available as options

This commit is contained in:
Christopher De Cairos 2011-10-28 12:00:01 -04:00
Родитель 9b3982806e
Коммит e9ef87fab8
3 изменённых файлов: 39 добавлений и 4 удалений

Просмотреть файл

@ -231,12 +231,13 @@
flashvars = {
clip_id: src,
show_portrait: 1,
show_byline: 1,
show_title: 1,
js_api: 1,
js_swf_id: vimeoContainer.id
js_swf_id: vimeoContainer.id,
};
// extend options from user to flashvars. NOTE: Videos owned by Plus Vimeo users may override these options
Popcorn.extend( flashvars, options );
params = {
allowscriptaccess: "always",
allowfullscreen: "true",

Просмотреть файл

@ -4,6 +4,7 @@
<title>Vimeo Player Unit Test Suite</title>
<link rel="stylesheet" href="../../test/qunit/qunit.css" type="text/css" media="screen">
<script src="../../test/qunit/qunit.js"></script>
<script src="../../test/jquery.js"></script>
<!--
do not move - this must be called immediately prior to
popcorn-api-draft.js

Просмотреть файл

@ -1,3 +1,36 @@
test( "Options Check", function() {
QUnit.reset();
expect( 7 );
var varz = {
title: 0,
byline: 0,
portrait:0,
autoplay:1,
loop:1,
color: "FFAADD",
fullscreen: 0
},
p2 = Popcorn.vimeo( "#player_1", "http://player.vimeo.com/video/6960892", varz );
stop();
p2.listen( "loadeddata", function() {
var flashvars = $( 'param[name="flashvars"]' ).attr( "value" );
var splitvars = flashvars.split( "&" );
for ( var i = 0, len = splitvars.length; i < len; i++ ) {
var item = splitvars[ i ].split( "=" );
if ( varz.hasOwnProperty( item[ 0 ] ) ) {
equal( varz[ item[ 0 ] ], item[ 1 ], item[ 0 ] + " is the expected value" );
}
}
start();
});
});
test( "Update Timer", function() {
QUnit.reset();