this.singleMode = (this.datas.mobileNavigationType === 'portrait');
this.junk = datas.cacheDate;
+ this.input=new FluidbookInput(this);
if (this.datas.landingPage != undefined && this.datas.landingPage != '') {
this.landingpage = new FluidbookLandingPage(this);
}
this.desktop = new FluidbookDesktop(this);
this.share = new FluidbookShare(this);
this.firstTransition = true;
- if (Modernizr.ftouch) {
+ if (this.input.hasTouch) {
this.touch = new FluidbookTouch(this);
}
this.background = new FluidbookBackground(this);
event.preventDefault();
});
- if (!Modernizr.ftouch) {
- $("#slider").on('mouseenter mousemove', function (e) {
+ $("#slider").on('mouseenter mousemove', function (e) {
+ if ($this.fluidbook.input.isUsingMouse()) {
return $this.hover(e.pageX);
- });
+ }
+ });
- $("#slider").on('mouseleave', function () {
+ $("#slider").on('mouseleave', function () {
+ if ($this.fluidbook.input.isUsingMouse()) {
$("#slider").removeClass('hover');
- });
- }
+ }
+ });
+
},
hover: function (pageX) {
}
}
}
- // if (!Modernizr.ftouch && this.flash) {
- // maybe.push('flv');
- // }
-
this.videoFormats = $.merge(probably, maybe, not);
this.preferedFormat = this.videoFormats[0];
//console.log(id + ' player already active. Disposing...');
try {
videojs(id).dispose();
- }
- catch (exception) {
+ } catch (exception) {
console.warn('Error disposing player #' + id + ' -- ' + exception.message);
}
}
getActivePlayers: function () {
var players = [];
- if (typeof(videojs) !== "undefined" && Object.keys(videojs.players).length > 0) {
+ if (typeof (videojs) !== "undefined" && Object.keys(videojs.players).length > 0) {
for (var id in videojs.players) {
// When videoJS disposes a player, the ID isn't removed
// from the list of players but the value will be null
try {
var player = videojs(id);
$this.disposeVideo(player);
- }catch (e) {
-
+ } catch (e) {
+
}
});
},