Skip to content

Commit

Permalink
lead with html5 only if the browsers supports it (fixed blackberry is…
Browse files Browse the repository at this point in the history
…sue with leadWithHTML5)
  • Loading branch information
ranyefet committed Dec 6, 2012
1 parent 6f7298e commit 839ef37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kWidget/kWidget.js
Expand Up @@ -1265,8 +1265,11 @@ var kWidget = {
}

// Check for "Kaltura.LeadWithHTML5" attribute
if( mw.getConfig( 'KalturaSupport.LeadWithHTML5' ) || mw.getConfig( 'Kaltura.LeadWithHTML5' ) ){
return this.supportsHTML5();
// Only return true if the browser actually supports html5
if(
(mw.getConfig( 'KalturaSupport.LeadWithHTML5' ) || mw.getConfig( 'Kaltura.LeadWithHTML5' ))
&& this.supportsHTML5() ){
return true;
}

This comment has been minimized.

Copy link
@mdale

mdale Dec 6, 2012

how are these conditionals different? .. if leadWithHTML5 we return this.supportsHTML5() ... in the second instance if leadWithHTML5 == true, we return true ...

was supportsHTML5 returning the wrong thing ( i.e true for blackberry when it should have been false? ) how does this "fix" the issue? supportsHTML5 will still be "true" and we will still return "true" for leadWithHTML5 ..? ...

am I missing something?

This comment has been minimized.

Copy link
@avivais

avivais Dec 6, 2012

Contributor

For instance, if someone to load a player with leadWithHTML5 on a Blackberry device.

Previously we would enter this condition and return supportsHTML5, in this case - false.
This would result in an attempt to load the Flash player.

However, what we would really want would be to return true, as stated below, in the if( mw.getConfig( 'Kaltura.IframeRewrite' ) ) condition:
// if we have the iframe enabled return true ( since the iframe will output a fallback link
// even if the client does not support html5 or flash )

Which is the case now.

This comment has been minimized.

Copy link
@mdale

mdale Dec 6, 2012

ic... we want to continue down to IframeRewrite ... to return true ...instead of returning false for supportsHTML5 ...

perhaps we could clean this up a bit, and not conflate the "isHTML5FallForward" with "isIFrameRewrite" ...or just rename isHTML5FallForward to isIframeEmbed ?


// Special check for Android:
Expand Down

0 comments on commit 839ef37

Please sign in to comment.