summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2016-11-23 10:30:26 -0400
committerPliable Pixels <pliablepixels@gmail.com>2016-11-23 10:30:26 -0400
commit2118c797762d6ef2699a80b2dc3356a6f10d0bae (patch)
tree3c3eb8df5bad81739b3883462532700beaae0966
parent5eac484a44243b7d1a41036f4d25c4f23dcc6e76 (diff)
updates to make inline playback work on iOS
-rw-r--r--config.xml1
-rw-r--r--www/js/EventModalCtrl.js1
-rw-r--r--www/lib/videogular/videogular.js9
-rw-r--r--www/templates/events-modal.html2
4 files changed, 10 insertions, 3 deletions
diff --git a/config.xml b/config.xml
index 35630ff8..11ab5829 100644
--- a/config.xml
+++ b/config.xml
@@ -12,6 +12,7 @@
<access launch-external="yes" origin="mailto:*" />
<allow-navigation href="*" />
<allow-intent href="*" />
+ <preference name="AllowInlineMediaPlayback" value="true" />
<preference name="CrosswalkAnimatable" value="true" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js
index 7a66a506..9a3730f7 100644
--- a/www/js/EventModalCtrl.js
+++ b/www/js/EventModalCtrl.js
@@ -1618,6 +1618,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro
autoPlay: true,
responsive: false,
nativeControls: false,
+ nativeFullScreen:false,
playsInline: true,
sources: [
diff --git a/www/lib/videogular/videogular.js b/www/lib/videogular/videogular.js
index 1a29b398..105d0463 100644
--- a/www/lib/videogular/videogular.js
+++ b/www/lib/videogular/videogular.js
@@ -960,8 +960,13 @@ angular.module("com.2fdevs.videogular")
return API.playsInline;
},
function (newValue, oldValue) {
- if (newValue) API.mediaElement.attr("webkit-playsinline", "");
- else API.mediaElement.removeAttr("webkit-playsinline");
+ if (newValue) {
+ API.mediaElement.attr("webkit-playsinline", "");
+ API.mediaElement.attr("playsinline", "");
+ } else {
+ API.mediaElement.removeAttr("webkit-playsinline");
+ API.mediaElement.removeAttr("playsinline");
+ }
}
);
diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html
index c3dfc069..5d538a71 100644
--- a/www/templates/events-modal.html
+++ b/www/templates/events-modal.html
@@ -19,7 +19,7 @@
<div ng-if="defaultVideo!==undefined && defaultVideo!='' && loginData.enableh264 == true">
<div ng-if="videoIsReady">
<div style="height:{{$root.devHeight}}px; width:{{$root.devWidth}}px;">
- <videogular vg-error="onVideoError($event)" vg-can-play="onCanPlay()" vg-player-ready="onPlayerReady($API)" vg-plays-inline="videoObject.config.playsInline" vg-theme="videoObject.config.theme" vg-complete="playbackFinished()" on-double-tap="closeModal();" vg-autoplay="videoObject.config.autoPlay" vg-responsive="videoObject.config.responsive" vg-update-time="videoTime(event.Event.StartTime,$currentTime)">
+ <videogular vg-error="onVideoError($event)" vg-can-play="onCanPlay()" vg-native-fullscreen="videoObject.config.nativeFullScreen" vg-player-ready="onPlayerReady($API)" vg-plays-inline="videoObject.config.playsInline" vg-theme="videoObject.config.theme" vg-complete="playbackFinished()" on-double-tap="closeModal();" vg-autoplay="videoObject.config.autoPlay" vg-responsive="videoObject.config.responsive" vg-update-time="videoTime(event.Event.StartTime,$currentTime)">
<vg-media vg-src="videoObject.config.sources" vg-native-controls="videoObject.config.nativeControls">
</vg-media>
<vg-controls>