Skip to content

Commit

Permalink
use [0] instead of .get(0)
Browse files Browse the repository at this point in the history
git-svn-id: http://www.kaltura.org/kalorg/html5video/trunk/mwEmbed@3653 b58a29cf-3064-46da-94c6-1c29cc75c8e5
  • Loading branch information
KalturaGitBot committed Dec 26, 2011
1 parent e24685c commit 41aa7b6
Show file tree
Hide file tree
Showing 74 changed files with 167 additions and 167 deletions.
4 changes: 2 additions & 2 deletions modules/AdSupport/mw.VastAdParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ mw.VastAdParser = {
$companionHtml = $j('<a />')
.attr({
'href' : _this.getURLFromNode(
$j( companionNode ).find('CompanionClickThrough,NonLinearClickThrough').get(0)
$j( companionNode ).find('CompanionClickThrough,NonLinearClickThrough')[0]
)
}).append( $img );
} else {
Expand Down Expand Up @@ -266,7 +266,7 @@ mw.VastAdParser = {
getURLFromNode: function ( node ){
if( $j( node ).find('URL').length ){
// use the first url we find:
node = $j( node ).find( 'URL' ).get(0);
node = $j( node ).find( 'URL' )[0];
}
return $j.trim( decodeURIComponent( $j( node ).text() ) )
.replace( /^\<\!\-?\-?\[CDATA\[/, '' )
Expand Down
2 changes: 1 addition & 1 deletion modules/DoubleClick/mw.DoubleClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ mw.DoubleClick.prototype = {
adsManager.setHorizontalAlignment( google.ima.AdSlotAlignment.HorizontalAlignment.CENTER );
adsManager.setVerticalAlignment( google.ima.AdSlotAlignment.VerticalAlignment.BOTTOM );

adsManager.play( $overlay.get(0) );
adsManager.play( $overlay[0] );
// Set the active overlay manager:
_this.activeOverlayadManager = adsManager;

Expand Down
4 changes: 2 additions & 2 deletions modules/EmbedPlayer/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@
"currentTime" : 0,

// Previous player set time
// Lets javascript use $('#videoId').get(0).currentTime = newTime;
// Lets javascript use $('#videoId')[0].currentTime = newTime;
"previousTime" : 0,

// Previous player set volume
// Lets javascript use $('#videoId').get(0).volume = newVolume;
// Lets javascript use $('#videoId')[0].volume = newVolume;
"previousVolume" : 1,

// Initial player volume:
Expand Down
4 changes: 2 additions & 2 deletions modules/EmbedPlayer/mw.EmbedPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ mw.EmbedPlayer.prototype = {
var $this = $( this );
// Check if a image thumbnail is present:
if( this.$interface && this.$interface.find('.playerPoster').length ){
var img = this.$interface.find('.playerPoster').get(0);
var img = this.$interface.find('.playerPoster')[0];
var pHeight = $this.height();
// Check for intrinsic width and maintain aspect ratio
if( img.naturalWidth && img.naturalHeight ){
Expand Down Expand Up @@ -2294,7 +2294,7 @@ mw.EmbedPlayer.prototype = {
}));
mw.log("EmbedPlayer::getCompatibleSource: add " + source.src + ' of type:' + source.type );
});
var myMediaElement = new mw.MediaElement( $media.get(0) );
var myMediaElement = new mw.MediaElement( $media[0] );
var source = myMediaElement.autoSelectSource();
if( source ){
mw.log("EmbedPlayer::getCompatibleSource: " + source.getSrc());
Expand Down
2 changes: 1 addition & 1 deletion modules/EmbedPlayer/mw.EmbedPlayerVlc.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ mw.EmbedPlayerVlc = {
* Get the embed vlc object
*/
getPlayerElement : function() {
this.playerElement = $( '#' + this.pid ).get(0);
this.playerElement = $( '#' + this.pid )[0];
return this.playerElement;
}
};
Expand Down
6 changes: 3 additions & 3 deletions modules/EmbedPlayer/mw.IFramePlayerApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ mw.IFramePlayerApiClient.prototype = {

/* Un-used for now
var disableZoom = function() {
viewPortTag = $('head meta[name=viewport]').get(0);
viewPortTag = $('head meta[name=viewport]')[0];
$('head meta[name=viewport]').remove();
$('head').prepend('<meta name="viewport" content="width=device-width, initial-scale=1.0">');
};
Expand Down Expand Up @@ -286,7 +286,7 @@ mw.IFramePlayerApiClient.prototype = {
//Add the jQuery binding
jQuery.fn.iFramePlayer = function( readyCallback ){
// only support ONE iframe player at a time
var playerProxy = this.get(0);
var playerProxy = this[0];
mw.log( "$.iFramePlayer::" + playerProxy.id );

// Setup pointer to real iframe
Expand All @@ -308,7 +308,7 @@ jQuery.fn.iFramePlayer = function( readyCallback ){
};

// Setup the iframe:
var iframe = $('#' + iframePlayerId).get(0);
var iframe = $('#' + iframePlayerId)[0];
if( !iframe ){
mw.log("$.iFramePlayer:: Error invalid iFramePlayer request");
return false;
Expand Down
2 changes: 1 addition & 1 deletion modules/EmbedPlayer/mw.MediaSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ mw.MediaSource.prototype = {
this.mimeType = $( element ).attr( 'type' );
}else if ( $( element ).attr( 'content-type' ) ) {
this.mimeType = $( element ).attr( 'content-type' );
}else if( $( element ).get(0).tagName.toLowerCase() == 'audio' ){
}else if( $( element )[0].tagName.toLowerCase() == 'audio' ){
// If the element is an "audio" tag set audio format
this.mimeType = 'audio/ogg';
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/EmbedPlayer/mw.processEmbedPlayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mw.processEmbedPlayers = function( playerSelect, callback ) {
var areSelectedPlayersReady = function(){
var playersLoaded = true;
$.each( playerIdList, function(inx, playerId){
if( ! $( '#' + playerId ).get(0).playerReady ){
if( ! $( '#' + playerId )[0].playerReady ){
playersLoaded = false;
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions modules/EmbedPlayer/skins/mw.PlayerControlBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ mw.PlayerControlBuilder.prototype = {
size.height = vid.videoHeight;
}
// check for posterImage size: ( should have Intrinsic aspect size as well )
var img = this.embedPlayer.$interface.find('.playerPoster').get(0);
var img = this.embedPlayer.$interface.find('.playerPoster')[0];
if( !size.width && img && img.naturalWidth){
size.width = img.naturalWidth;
}
Expand Down Expand Up @@ -457,9 +457,9 @@ mw.PlayerControlBuilder.prototype = {
var leftOffset = '0px';

// Check if we have an offsetParent
if( $interface.offsetParent().get(0).tagName
if( $interface.offsetParent()[0].tagName
&&
$interface.offsetParent().get(0).tagName.toLowerCase() != 'body' )
$interface.offsetParent()[0].tagName.toLowerCase() != 'body' )
{
topOffset = -this.windowOffset.top + 'px';
leftOffset = -this.windowOffset.left + 'px';
Expand Down
4 changes: 2 additions & 2 deletions modules/EmbedPlayer/tests/Player_Seek.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ <h2>mwEmbed / archive.org server side seek</h2>
$j('#startTime').val( startTime );

// update current time then play:
$j('#vid1').get(0).currentTime = startTime;
$j('#vid1').get(0).play();
$j('#vid1')[0].currentTime = startTime;
$j('#vid1')[0].play();
}
// bind button:
$j('#doPageSeek').click(function(){
Expand Down
4 changes: 2 additions & 2 deletions modules/EmbedPlayer/tests/Player_ServerSeek.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ <h2>mwEmbed / archive.org server side seek</h2>
$j('#startTime').val( startTime );

// update current time then play:
$j('#vid1').get(0).currentTime = startTime;
$j('#vid1').get(0).play();
$j('#vid1')[0].currentTime = startTime;
$j('#vid1')[0].play();
}
// bind button:
$j('#doPageSeek').click(function(){
Expand Down
2 changes: 1 addition & 1 deletion modules/FreeWheel/mw.FreeWheelController.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ mw.FreeWheelControler.prototype = {
// We want this ad video element ( not the original pid getPlayerElement()
var $siblingVid = $( this.embedPlayer.getPlayerElement() ).siblings('video');
if( $siblingVid.length ){
return $siblingVid.get(0);
return $siblingVid[0];
}
return this.embedPlayer.getPlayerElement();
},
Expand Down
10 changes: 5 additions & 5 deletions modules/InternetArchiveSupport/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ mw.IA =


location.hash = '#' + // [get ORIG video file from playlist item and then matched back thru mrss variable etc.?] +
'/start=' + Math.round($('#mwplayer').get(0).currentTime * 10) / 10;
'/start=' + Math.round($('#mwplayer')[0].currentTime * 10) / 10;
},


Expand All @@ -198,7 +198,7 @@ mw.IA =
if (!mw.IA.playlist)
return;

var player = $('#'+mw.playerManager.getPlayerList()[0]).get(0);
var player = $('#'+mw.playerManager.getPlayerList()[0])[0];
if (!player)
return;

Expand All @@ -219,7 +219,7 @@ mw.IA =

mw.IA.log('onPlay');

var av=$('div.mv-player video, div.mv-player object, div.mv-player embed').parent().get(0);
var av=$('div.mv-player video, div.mv-player object, div.mv-player embed').parent()[0];

if (typeof(av)=='undefined' && $('img.playerPoster').length > 0)
{
Expand Down Expand Up @@ -296,7 +296,7 @@ mw.IA =
{
mw.ready(function(){

var player = $('#'+mw.playerManager.getPlayerList()[0]).get(0);
var player = $('#'+mw.playerManager.getPlayerList()[0])[0];
if (!player)
return;

Expand Down Expand Up @@ -339,7 +339,7 @@ mw.IA =
{
mw.ready(function(){

var player = $('#'+mw.playerManager.getPlayerList()[0]).get(0);
var player = $('#'+mw.playerManager.getPlayerList()[0])[0];
var IAD = {'identifier':'night_of_the_living_dead'};
var group = {'SRC':['night_of_the_living_dead.ogv',
'night_of_the_living_dead_512kb.mp4']};
Expand Down
4 changes: 2 additions & 2 deletions modules/KalturaSupport/kalturaIframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ private function javaScriptPlayerLogic(){
// Remove thumbnail from the iframe
$('#directFileLinkThumb').remove();

var embedPlayer = $( '#<?php echo htmlspecialchars( $this->getIframeId() )?>' ).get(0);
var embedPlayer = $( '#<?php echo htmlspecialchars( $this->getIframeId() )?>' )[0];
// Try to seek to the IframeSeekOffset time:
if( mw.getConfig( 'EmbedPlayer.IframeCurrentTime' ) ){
embedPlayer.currentTime = mw.getConfig( 'EmbedPlayer.IframeCurrentTime' );
Expand All @@ -847,7 +847,7 @@ private function javaScriptPlayerLogic(){
}
function doResizePlayer(){
$( '#<?php echo htmlspecialchars( $this->getIframeId() )?>' )
.get(0).resizePlayer({
[0].resizePlayer({
'width' : $(window).width(),
'height' : $(window).height()
});
Expand Down
4 changes: 2 additions & 2 deletions modules/KalturaSupport/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
.loadingSpinner()
)
);
var elm = $('#' + videoEmbedAttributes.id ).get(0);
var elm = $('#' + videoEmbedAttributes.id )[0];
// Assign values to DOM object methods ( not just attributes )
$.each( videoEmbedAttributes, function( attrName, attrValue ){
// skip style attr:
Expand Down Expand Up @@ -569,7 +569,7 @@
return ;
}
window[ cbName ] = function( iframeData ){
var newDoc = $( '#' + iframeId ).get(0).contentDocument;
var newDoc = $( '#' + iframeId )[0].contentDocument;
newDoc.open();
newDoc.write( iframeData.content );
newDoc.close();
Expand Down
2 changes: 1 addition & 1 deletion modules/KalturaSupport/mw.KAdPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ mw.KAdPlayer.prototype = {
$vidSibling
);
}
return $vidSibling.get(0);
return $vidSibling[0];
},
getVideoAdSiblingId: function(){
return this.embedPlayer.pid + '_adSibling';
Expand Down
4 changes: 2 additions & 2 deletions modules/KalturaSupport/mw.KLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mw.KLayout.prototype = {
offsetLeft+= $node.width();
}
// Box model! containers should not have width:
if( $node.get(0).nodeName.toLowerCase() == 'div' ){
if( $node[0].nodeName.toLowerCase() == 'div' ){
$node.css('width', '');
}
$boxContainer.append( $node );
Expand All @@ -102,7 +102,7 @@ mw.KLayout.prototype = {
}
});
// Apply props to the outer box:
this.applyUiConfAttributes( $boxContainer, $uiConfBox.get(0) );
this.applyUiConfAttributes( $boxContainer, $uiConfBox[0] );

return $boxContainer;
},
Expand Down
8 changes: 4 additions & 4 deletions modules/KalturaSupport/mw.KPPTWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ mw.KPPTWidget.prototype = {
loadPPTData: function( callback ){
var _this = this;
// get the presentation id:
var widgetId = this.$target.get(0).kwidgetid;
var widgetId = this.$target[0].kwidgetid;
// run the api query
mw.KApiRequest(widgetId, {
'service': 'data',
Expand Down Expand Up @@ -431,7 +431,7 @@ mw.KPPTWidget.prototype = {
},
addBindings: function(){
var _this = this;
var embedPlayer = $('#' + this.getEmbedPlayerId() ).get(0);
var embedPlayer = $('#' + this.getEmbedPlayerId() )[0];

// Run any player ready bindings:
$.each( _this.readyBindings, function(inx, readyCallback){
Expand Down Expand Up @@ -609,7 +609,7 @@ mw.KPPTWidget.prototype = {
}
},
getEmbedPlayer: function(){
return $('#' + this.getEmbedPlayerId() ).get(0);
return $('#' + this.getEmbedPlayerId() )[0];
},
getEmbedPlayerId: function(){
return this.playerId;
Expand All @@ -625,7 +625,7 @@ mw.KPPTWidget.prototype = {
return this.getPresentationData().find( 'entryId' ).text();
},
getVideoTag: function(){
var widgetId = this.$target.get(0).kwidgetid;
var widgetId = this.$target[0].kwidgetid;

return $('<video />').attr({
'id' : this.getEmbedPlayerId(),
Expand Down
4 changes: 2 additions & 2 deletions modules/KalturaSupport/mw.KTimedText.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
'fileExt' : type,
'type' : this.getTextContentType( type ),
'src' : ccUrl
}).get(0)
})[0]
);
// Return a "textSource" object:
return [ new mw.TextSource( embedSource ) ];
Expand All @@ -184,7 +184,7 @@
'src' : _this.getCaptionUrl( dbTextSource.id, dbTextSource.fileExt ),
'title' : dbTextSource.label,
'default' : dbTextSource.isDefault
}).get(0)
})[0]
);
// Return a "textSource" object:
return new mw.TextSource( embedSource );
Expand Down
6 changes: 3 additions & 3 deletions modules/KalturaSupport/mw.KWidgetSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ mw.KWidgetSupport.prototype = {
}
if( !attr && confPrefix ){
if( $plugin.length ) {
$.each( $plugin.get(0).attributes, function(i, nodeAttr){
$.each( $plugin[0].attributes, function(i, nodeAttr){
config[ nodeAttr.name ] = nodeAttr.value;
});
}
Expand All @@ -425,7 +425,7 @@ mw.KWidgetSupport.prototype = {
var attrName = $(node).attr('key');
if( $(node).attr('overrideflashvar') != "false" || ! config[attrName] ){
var attrKey = attrName.replace( confPrefix + '.', '');
config[ attrKey ] = $(node).get(0).getAttribute('value');
config[ attrKey ] = $(node)[0].getAttribute('value');
}
});
} else {
Expand All @@ -451,7 +451,7 @@ mw.KWidgetSupport.prototype = {
$uiPluginVars.each( function(inx, node){
if( $( node ).attr('key') == pluginPrefix + attrName ){
if( $(node).attr('overrideflashvar') != "false" || ! config[attrName] ){
config[attrName] = $(node).get(0).getAttribute('value');
config[attrName] = $(node)[0].getAttribute('value');
}
// Found break out of loop
return false;
Expand Down
2 changes: 1 addition & 1 deletion modules/KalturaSupport/mw.PlaylistHandlerKaltura.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ mw.PlaylistHandlerKaltura.prototype = {
offsetLeft+= $node.width();
}
// Box model! containers should not have width:
if( $node.get(0).nodeName.toLowerCase() == 'div' ){
if( $node[0].nodeName.toLowerCase() == 'div' ){
$node.css('width', '');
}
$boxContainer.append( $node );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<script>
// TOOD move these into the test setup above
KWidget.addReadyCallback(function( playerId ){
var kdp = $( '#' + playerId ).get(0);
var kdp = $( '#' + playerId )[0];
log( playerId + ' > addJsListener:: freePreviewEnd' );
kdp.addJsListener( 'freePreviewEnd', 'onFreePreviewEnd' );
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// Name this module
module( "VAST flashvar DoubleClick Ad and Companion " );
var kdp = $('#' + videoId ).get(0);
var kdp = $('#' + videoId )[0];

asyncTest("VAST DoubleClick Ad", function(){
kalturaQunitWaitForPlayer(function(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// Name this module
module( "VAST DoubleClick Ad and Companion " );
var kdp = $('#' + videoId ).get(0);
var kdp = $('#' + videoId )[0];

asyncTest("VAST DoubleClick Ad", function(){
kalturaQunitWaitForPlayer(function(){
Expand Down
Loading

0 comments on commit 41aa7b6

Please sign in to comment.