File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1- import isPlainObject from 'lodash/isPlainObject' ;
21import { sliceProperties } from 'utils/slicing' ;
32import { PLAYER_EVENT } from 'utils/consts' ;
43import { getCloudinaryUrl } from 'plugins/cloudinary/common' ;
@@ -22,7 +21,7 @@ const playlist = (player, options = {}) => {
2221 playlistWidget . dispose ( ) ;
2322 }
2423
25- if ( isPlainObject ( options . playlistWidget ) ) {
24+ if ( options . playlistWidget ?. show != false ) {
2625 if ( player . fluid_ ) {
2726 options . playlistWidget . fluid = true ;
2827 }
Original file line number Diff line number Diff line change @@ -240,7 +240,13 @@ class Playlist {
240240 current . recommendations ( this . _defaultRecommendationsResolver ( current ) ) ;
241241 }
242242
243- this . _context . source ( current , { recommendationOptions : { disableAutoShow : true , itemBuilder } } ) ;
243+ // Extract source options for analytics
244+ const sourceOptions = current . getInitOptions ? current . getInitOptions ( ) : { } ;
245+
246+ this . _context . source ( current , {
247+ ...sourceOptions ,
248+ recommendationOptions : { disableAutoShow : true , itemBuilder }
249+ } ) ;
244250
245251 const eventData = { playlist : this , current, next : this . next ( ) } ;
246252
Original file line number Diff line number Diff line change @@ -603,7 +603,7 @@ class VideoPlayer extends Utils.mixin(Eventable) {
603603 }
604604
605605 playlist ( sources , options = { } ) {
606- this . playerOptions . playlistWidget = { ...( this . playerOptions . playlistWidget || { } ) , playlist : true } ;
606+ this . playerOptions . playlistWidget = { ...( this . playerOptions . playlistWidget || { show : false } ) , playlist : true } ;
607607
608608 options = Object . assign ( { } , options , { playlistWidget : this . playerOptions . playlistWidget } ) ;
609609
@@ -616,7 +616,7 @@ class VideoPlayer extends Utils.mixin(Eventable) {
616616 }
617617
618618 playlistByTag ( tag , options = { } ) {
619- this . playerOptions . playlistWidget = { ...( this . playerOptions . playlistWidget || { } ) , playlistByTag : true } ;
619+ this . playerOptions . playlistWidget = { ...( this . playerOptions . playlistWidget || { show : false } ) , playlistByTag : true } ;
620620
621621 options = Object . assign ( { } , options , { playlistWidget : this . playerOptions . playlistWidget } ) ;
622622
You can’t perform that action at this time.
0 commit comments