Skip to content

Commit

Permalink
[#915] Fixed Review nits
Browse files Browse the repository at this point in the history
  • Loading branch information
mjschranz committed Jun 5, 2012
1 parent cd81d43 commit cda6ab2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions plugins/mediaspawner/popcorn.mediaspawner.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@
source: {
elem: "input",
type: "text",
label: "Media Source"
label: "Media Source",
"default": "http://www.youtube.com/watch?v=CXDstfD9eJ0"
},
caption: {
elem: "input",
type: "text",
label: "Media Caption",
"default": "Popcorn Popping",
optional: true
},
target: "mediaspawner-container",
Expand All @@ -80,12 +82,14 @@
elem: "input",
type: "text",
label: "Media Width",
"default": "400",
optional: true
},
height: {
elem: "input",
type: "text",
label: "Media Height",
"default": "200",
optional: true
}
}
Expand Down Expand Up @@ -117,7 +121,7 @@
}
else {
// if the regex didn't return anything we know it's an HTML5 source
mediaType = "HTML";
mediaType = "HTML5";
}

if ( mediaType === "vimeo" || mediaType === "soundcloud" ) {
Expand Down Expand Up @@ -151,15 +155,15 @@
function constructMedia(){

function checkPlayerTypeLoaded() {
if ( mediaType !== "HTML" && !window.Popcorn[ mediaType ] ) {
if ( mediaType !== "HTML5" && !window.Popcorn[ mediaType ] ) {
setTimeout( function() {
checkPlayerTypeLoaded();
}, 300 );
} else {
options.id = options._container.id;
options.popcorn = Popcorn.smart( "#" + options.id, options.source );

if ( mediaType === "HTML" ) {
if ( mediaType === "HTML5" ) {
options.popcorn.controls( true );
}

Expand All @@ -169,7 +173,7 @@
}
}

if ( mediaType !== "HTML" && !window.Popcorn[ mediaType ] && !playerTypeLoading[ mediaType ] ) {
if ( mediaType !== "HTML5" && !window.Popcorn[ mediaType ] && !playerTypeLoading[ mediaType ] ) {
playerTypeLoading[ mediaType ] = true;
Popcorn.getScript( "http://popcornjs.org/code/players/" + mediaType + "/popcorn." + mediaType + ".js", function() {
checkPlayerTypeLoaded();
Expand Down

0 comments on commit cda6ab2

Please sign in to comment.