Skip to content

Commit

Permalink
Merge pull request #5147 from avalonmediasystem/develop
Browse files Browse the repository at this point in the history
Avalon 7.6 RC 2
  • Loading branch information
cjcolvar authored Mar 31, 2023
2 parents aea5dec + d9074de commit 01591d5
Show file tree
Hide file tree
Showing 16 changed files with 215 additions and 122 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ gem 'bootsnap', require: false
gem 'listen'
gem 'net-smtp', require: false
gem 'psych', '< 4'
gem 'rails', '=7.0.4.2'
gem 'rails', '=7.0.4.3'
gem 'sprockets', '~>3.7.2'
#gem 'sprockets-rails', require: 'sprockets/railtie'
gem 'sqlite3'
Expand Down Expand Up @@ -74,9 +74,9 @@ gem 'omniauth-lti', git: "https://github.com/avalonmediasystem/omniauth-lti.git"
gem "omniauth-saml", "~> 2.0"

# Media Access & Transcoding
gem 'active_encode', '~> 1.0', '>= 1.1.2'
gem 'active_encode', '~> 1.0', '>= 1.1.3'
gem 'audio_waveform-ruby', '~> 1.0.7', require: 'audio_waveform'
gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", tag: 'v1.2.0-avalon'
gem 'browse-everything', git: "https://github.com/avalonmediasystem/browse-everything.git", branch: 'v1.2-avalon'
gem 'fastimage'
gem 'media_element_add_to_playlist', git: 'https://github.com/avalonmediasystem/media-element-add-to-playlist.git', tag: 'avalon-r6.5'
gem 'mediainfo', git: "https://github.com/avalonmediasystem/mediainfo.git", tag: 'v0.7.1-avalon'
Expand Down
130 changes: 65 additions & 65 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ GIT

GIT
remote: https://github.com/avalonmediasystem/browse-everything.git
revision: 38610d19d36105ca9c311e0a641fdb43697fabea
tag: v1.2.0-avalon
revision: 51ac41d1631eba86b123222d9bfeef342f25ec56
branch: v1.2-avalon
specs:
browse-everything (1.2.0)
addressable (~> 2.5)
Expand Down Expand Up @@ -76,47 +76,47 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.4.2)
actionpack (= 7.0.4.2)
activesupport (= 7.0.4.2)
actioncable (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.4.2)
actionpack (= 7.0.4.2)
activejob (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
actionmailbox (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.4.2)
actionpack (= 7.0.4.2)
actionview (= 7.0.4.2)
activejob (= 7.0.4.2)
activesupport (= 7.0.4.2)
actionmailer (7.0.4.3)
actionpack (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activesupport (= 7.0.4.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.4.2)
actionview (= 7.0.4.2)
activesupport (= 7.0.4.2)
actionpack (7.0.4.3)
actionview (= 7.0.4.3)
activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.4.2)
actionpack (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
actiontext (7.0.4.3)
actionpack (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.4.2)
activesupport (= 7.0.4.2)
actionview (7.0.4.3)
activesupport (= 7.0.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -143,7 +143,7 @@ GEM
active_elastic_job (3.2.0)
aws-sdk-sqs (~> 1)
rails (>= 5.2.6, < 7.1)
active_encode (1.1.2)
active_encode (1.1.3)
addressable (~> 2.8)
rails
active_fedora-datastreams (0.5.0)
Expand All @@ -153,8 +153,8 @@ GEM
om (~> 3.1)
rdf (~> 3.2)
rdf-rdfxml (~> 3.2)
activejob (7.0.4.2)
activesupport (= 7.0.4.2)
activejob (7.0.4.3)
activesupport (= 7.0.4.3)
globalid (>= 0.3.6)
activejob-traffic_control (0.1.3)
activejob (>= 4.2)
Expand All @@ -163,25 +163,25 @@ GEM
activejob-uniqueness (0.2.5)
activejob (>= 4.2, < 7.1)
redlock (>= 1.2, < 2)
activemodel (7.0.4.2)
activesupport (= 7.0.4.2)
activerecord (7.0.4.2)
activemodel (= 7.0.4.2)
activesupport (= 7.0.4.2)
activemodel (7.0.4.3)
activesupport (= 7.0.4.3)
activerecord (7.0.4.3)
activemodel (= 7.0.4.3)
activesupport (= 7.0.4.3)
activerecord-session_store (2.0.0)
actionpack (>= 5.2.4.1)
activerecord (>= 5.2.4.1)
multi_json (~> 1.11, >= 1.11.2)
rack (>= 2.0.8, < 3)
railties (>= 5.2.4.1)
activestorage (7.0.4.2)
actionpack (= 7.0.4.2)
activejob (= 7.0.4.2)
activerecord (= 7.0.4.2)
activesupport (= 7.0.4.2)
activestorage (7.0.4.3)
actionpack (= 7.0.4.3)
activejob (= 7.0.4.3)
activerecord (= 7.0.4.3)
activesupport (= 7.0.4.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.4.2)
activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -199,13 +199,13 @@ GEM
autoprefixer-rails (10.4.7.0)
execjs (~> 2)
aws-eventstream (1.2.0)
aws-partitions (1.709.0)
aws-partitions (1.735.0)
aws-record (2.10.1)
aws-sdk-dynamodb (~> 1.18)
aws-sdk-cloudfront (1.75.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-core (3.170.0)
aws-sdk-core (3.171.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
Expand All @@ -216,7 +216,7 @@ GEM
aws-sdk-elastictranscoder (1.40.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-kms (1.62.0)
aws-sdk-kms (1.63.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sigv4 (~> 1.1)
aws-sdk-rails (3.7.0)
Expand All @@ -227,7 +227,7 @@ GEM
aws-sessionstore-dynamodb (~> 2)
concurrent-ruby (~> 1)
railties (>= 5.2.0)
aws-sdk-s3 (1.119.0)
aws-sdk-s3 (1.119.2)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
Expand Down Expand Up @@ -459,7 +459,7 @@ GEM
webrick
google-apis-drive_v3 (0.37.0)
google-apis-core (>= 0.11.0, < 2.a)
googleauth (1.3.0)
googleauth (1.5.0)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
Expand Down Expand Up @@ -661,29 +661,29 @@ GEM
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.6.2)
rack (2.2.6.3)
rack (2.2.6.4)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-protection (3.0.5)
rack
rack-proxy (0.7.6)
rack
rack-test (2.0.2)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.4.2)
actioncable (= 7.0.4.2)
actionmailbox (= 7.0.4.2)
actionmailer (= 7.0.4.2)
actionpack (= 7.0.4.2)
actiontext (= 7.0.4.2)
actionview (= 7.0.4.2)
activejob (= 7.0.4.2)
activemodel (= 7.0.4.2)
activerecord (= 7.0.4.2)
activestorage (= 7.0.4.2)
activesupport (= 7.0.4.2)
rails (7.0.4.3)
actioncable (= 7.0.4.3)
actionmailbox (= 7.0.4.3)
actionmailer (= 7.0.4.3)
actionpack (= 7.0.4.3)
actiontext (= 7.0.4.3)
actionview (= 7.0.4.3)
activejob (= 7.0.4.3)
activemodel (= 7.0.4.3)
activerecord (= 7.0.4.3)
activestorage (= 7.0.4.3)
activesupport (= 7.0.4.3)
bundler (>= 1.15.0)
railties (= 7.0.4.2)
railties (= 7.0.4.3)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -696,9 +696,9 @@ GEM
rails_same_site_cookie (0.1.9)
rack (>= 1.5)
user_agent_parser (~> 2.6)
railties (7.0.4.2)
actionpack (= 7.0.4.2)
activesupport (= 7.0.4.2)
railties (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -993,7 +993,7 @@ DEPENDENCIES
active-fedora (~> 14.0, >= 14.0.1)
active_annotations (~> 0.4)
active_elastic_job
active_encode (~> 1.0, >= 1.1.2)
active_encode (~> 1.0, >= 1.1.3)
active_fedora-datastreams (~> 0.5)
activejob-traffic_control
activejob-uniqueness
Expand Down Expand Up @@ -1079,7 +1079,7 @@ DEPENDENCIES
psych (< 4)
puma (>= 4.3.8)
rack-cors
rails (= 7.0.4.2)
rails (= 7.0.4.3)
rails-controller-testing
rails_same_site_cookie
rb-readline
Expand Down
46 changes: 35 additions & 11 deletions app/assets/javascripts/media_player_wrapper/avalon_player_new.es6
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class MEJSPlayer {
);

// Build playlists button from the new stream when not in playlists
if(!playlistItemsT) {
if(!playlistItemsT && !this.mejsUtility.isMobile()) {
this.player.options.playlistItemDefaultTitle = this.currentStreamInfo.embed_title;
this.player.buildaddToPlaylist(this.player, null, null, null);
}
Expand All @@ -290,11 +290,20 @@ class MEJSPlayer {
this.player.buildplaylistItems(this.player, null, null, this.mediaElement);
}

// Set defaultQuality in player options before building the quality feature
this.player.options.defaultQuality = this.localStorage.getItem('quality');
// Quality selector is turned off in mobile devices
if(!mejs.Features.isAndroid) {
// Set defaultQuality in player options before building the quality feature
this.player.options.defaultQuality = this.localStorage.getItem('quality');

// Build quality
this.player.buildquality(this.player, null, null, this.mediaElement);
// Build quality
this.player.buildquality(this.player, null, null, this.mediaElement);
} else {
// Set current source in absence of the quality selection
let currentSource = this.currentStreamInfo.stream_hls
.filter(src => src.quality === this.player.options.defaultQuality)[0];

this.player.setSrc(currentSource.url);
}

// Set startVolume in options from the current mediaelement instance
this.player.options.startVolume = this.mediaElement.volume;
Expand All @@ -314,8 +323,15 @@ class MEJSPlayer {
*/
reInitializeCaptions() {
if (this.currentStreamInfo.captions_path) {
// Place tracks button after volume button when tracks are available
this.player.featurePosition.tracks = this.player.featurePosition.volume + 1;
// Place tracks button
if(this.mejsUtility.isMobile()) {
// after trackScrubber button in mobile devices
this.player.featurePosition.tracks = this.player.featurePosition.trackScrubber + 1;
} else {
// after volume button in desktop devices
this.player.featurePosition.tracks = this.player.featurePosition.volume + 1;
}

this.player.buildtracks(this.player, null, this.player.layers, this.mediaElement);
// Turn on captions
this.toggleCaptions();
Expand Down Expand Up @@ -399,9 +415,17 @@ class MEJSPlayer {
this.mejsUtility.showControlsBriefly(this.player);
// Fix for paused seeking halt when using structure navigation
// by forcing timeupdate event to fire with a quick and pause
if(this.mediaElement.paused) {
this.mediaElement.play();
this.mediaElement.pause();
if(this.mediaElement.paused && this.mediaElement) {
/** Reference: https://developer.chrome.com/blog/play-request-was-interrupted/ */
let playPromise = this.mediaElement.play();
if(playPromise !== undefined) {
playPromise.then(_ => {
this.mediaElement.pause();
})
.catch(error => {
console.log('Media player error: ', error);
})
}
}
}

Expand Down Expand Up @@ -446,7 +470,7 @@ class MEJSPlayer {
* @return {void}
*/
handleError(error, mediaElement, originalNode) {
console.log('MEJS CREATE ERROR: ' + error);
console.log('MEJS ERROR: ' + error);
}
/**
* MediaElement render success callback function
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class MEJSUtility {
node = document.createElement('video');
node.setAttribute('id', 'mejs-avalon-player');
node.setAttribute('controls', '');
node.setAttribute('width', '450');
node.setAttribute('height', '309');
node.setAttribute('width', '480');
node.setAttribute('height', '270');
node.setAttribute('style', 'width: 100%; height: 100%');
if (currentStreamInfo.poster_image) {
node.setAttribute('poster', currentStreamInfo.poster_image);
Expand Down
4 changes: 4 additions & 0 deletions app/assets/stylesheets/blacklight.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
max-width: 160px;
}

.no-icon img, img.no-icon {
max-height: 90px;
}

.btn-outline-primary {
@extend .btn-sm;
@extend .btn-outline;
Expand Down
Loading

0 comments on commit 01591d5

Please sign in to comment.