pageflow 12.0.2 → 12.0.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56358a772f2ffd39c8ff1e923381474a84e7479d
4
- data.tar.gz: 24450abb51ff9fda63c25df4e1a1886bf015636c
3
+ metadata.gz: c54e2d1eaa625de6e8658a049e21b086c2ffe8fc
4
+ data.tar.gz: f686b049c0bce278a4ec2a7ee608235ea8c14d62
5
5
  SHA512:
6
- metadata.gz: 9ba66d120beb537080abf0eb7ad8e9d6c8ac623de3f215a41d2796ba58d70aae9c611666458c5666d2da36df7146dc6df03edf5c17b82b4b509782ac4f657835
7
- data.tar.gz: 1dad4196be1ce9d5f2fd5cdc9e2d90462193503277377408d2d48772fe73ec40235f24a9e1ad752ef96c41ce1e291d9f25e9eaf7d6bf79985b7c47fc834ac89a
6
+ metadata.gz: 5d1050a6b84a5545ec6c79d82e3bce94909caa50d19f1f7f6e438d4af1ea7262fdf5d61e898d545afec938e7527f64c196da06d6f1a90d0c584691cacd321b73
7
+ data.tar.gz: a3a50d30c0978f1d2edabe76373fd36470ec1816e2acc48ea5bf51557d7e6a102442c2d51bb227a44512f46a340ea7801d434afc641332a2b6a9df72e8d17f36
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
+ ### Version 12.0.3
4
+
5
+ 2017-09-14
6
+
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/v12.0.2...v12.0.3)
8
+
9
+ - Bug fix: Handle async tech loading in VideoJS 6
10
+ ([#875](https://github.com/codevise/pageflow/pull/875))
11
+
3
12
  ### Version 12.0.2
4
13
 
5
14
  2017-09-13
@@ -23581,21 +23581,23 @@ pageflow = typeof pageflow === "object" ? pageflow : {}; pageflow["react"] =
23581
23581
  playsInline: props.playsInline
23582
23582
  });
23583
23583
 
23584
- (0, _handlePlayerState.initPlayer)(_this.player, function () {
23585
- return _this.props.playerState;
23586
- }, _this.props.playerActions, _this.prevFileId, _this.props.file.id);
23587
-
23588
- if (!_this.displaysTextTracksInNativePlayer) {
23589
- (0, _textTracks.initTextTracks)(_this.player, function () {
23590
- return _this.props.textTracks.activeFileId;
23591
- }, function () {
23592
- return _this.props.textTrackPosition;
23593
- });
23594
- }
23584
+ _this.player.ready(function () {
23585
+ (0, _handlePlayerState.initPlayer)(_this.player, function () {
23586
+ return _this.props.playerState;
23587
+ }, _this.props.playerActions, _this.prevFileId, _this.props.file.id);
23588
+
23589
+ if (!_this.displaysTextTracksInNativePlayer) {
23590
+ (0, _textTracks.initTextTracks)(_this.player, function () {
23591
+ return _this.props.textTracks.activeFileId;
23592
+ }, function () {
23593
+ return _this.props.textTrackPosition;
23594
+ });
23595
+ }
23595
23596
 
23596
- (0, _watchPlayer2.default)(_this.player, _this.props.playerActions);
23597
+ (0, _watchPlayer2.default)(_this.player, _this.props.playerActions);
23597
23598
 
23598
- _this.prevFileId = _this.props.file.id;
23599
+ _this.prevFileId = _this.props.file.id;
23600
+ });
23599
23601
  };
23600
23602
 
23601
23603
  _this.disposeMediaTag = function () {
@@ -1,4 +1,5 @@
1
1
  //= require_self
2
+ //= require ./media_player/catch_play_promise
2
3
  //= require ./media_player/volume_fading
3
4
  //= require ./media_player/volume_binding
4
5
  //= require ./media_player/load_waiting
@@ -7,6 +8,7 @@
7
8
 
8
9
  pageflow.mediaPlayer = {
9
10
  enhance: function(player, options) {
11
+ pageflow.mediaPlayer.catchPlayerPromise(player);
10
12
  pageflow.mediaPlayer.asyncPlay(player);
11
13
 
12
14
  if (options.hooks) {
@@ -0,0 +1,23 @@
1
+ /*global Promise*/
2
+
3
+ // Chrome returns a promise from `play` that is rejected if another
4
+ // operation (like calling `pause` or updating the source) happens
5
+ // before playing started. If the promise rejection is not handled,
6
+ // the operation that caused `play` to abort will fail with an
7
+ // exception. Code following the operation will not be executed. Catch
8
+ // and ignore the promise to prevent this.
9
+ pageflow.mediaPlayer.catchPlayerPromise = function(player) {
10
+ var originalPlay = player.play;
11
+
12
+ player.play = function(/* arguments */) {
13
+ var result = originalPlay.apply(player, arguments);
14
+
15
+ if (result && (typeof Promise !== 'undefined') && (result instanceof Promise)) {
16
+ result.catch(function() {
17
+ pageflow.log('Caught pending play exception - continuing');
18
+ });
19
+ }
20
+
21
+ return result;
22
+ };
23
+ };
@@ -11,6 +11,6 @@ pageflow.mediaPlayer.useSlimPlayerControlsDuringPhonePlayback = function(player)
11
11
  });
12
12
  }
13
13
 
14
- originalPlay.apply(this, arguments);
14
+ return originalPlay.apply(this, arguments);
15
15
  };
16
16
  };
@@ -1,3 +1,3 @@
1
1
  module Pageflow
2
- VERSION = '12.0.2'.freeze
2
+ VERSION = '12.0.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.2
4
+ version: 12.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-13 00:00:00.000000000 Z
11
+ date: 2017-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1225,6 +1225,7 @@ files:
1225
1225
  - app/assets/javascripts/pageflow/manual_start.js
1226
1226
  - app/assets/javascripts/pageflow/media_player.js
1227
1227
  - app/assets/javascripts/pageflow/media_player/async_play.js
1228
+ - app/assets/javascripts/pageflow/media_player/catch_play_promise.js
1228
1229
  - app/assets/javascripts/pageflow/media_player/hooks.js
1229
1230
  - app/assets/javascripts/pageflow/media_player/load_waiting.js
1230
1231
  - app/assets/javascripts/pageflow/media_player/volume_binding.js