File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 281281 download : false //Show/Hide download buttons
282282 } ,
283283 spotifyEmbed : true ,
284+ spotifyOptions : {
285+ width : "100%" ,
286+ height : 80
287+ } ,
284288 codepenEmbed : true ,
285289 codepenHeight : 300 ,
286290 jsfiddleEmbed : true ,
562566 return str ;
563567 } ,
564568
565- spotifyEmbed : function ( str ) {
569+ spotifyEmbed : function ( str , opts ) {
566570 var spotifyRegex = / s p o t i f y .c o m \/ t r a c k \/ [ a - z A - Z 0 - 9 _ ] + / gi;
567571 var matches = str . match ( spotifyRegex ) ? str . match ( spotifyRegex ) . getUnique ( ) : null ;
568572 if ( matches ) {
569573 var i = 0 ;
570574 while ( i < matches . length ) {
571- var frame = $sce . trustAsHtml ( '<iframe src="https://embed.spotify.com/?uri=spotify:track:' + matches [ i ] . split ( '/' ) [ 2 ] + '" height="80 "></iframe>' ) ;
575+ var frame = $sce . trustAsHtml ( '<iframe src="https://embed.spotify.com/?uri=spotify:track:' + matches [ i ] . split ( '/' ) [ 2 ] + '" width="' + opts . spotifyOptions . width + '" height="' + opts . spotifyOptions . height + ' "></iframe>') ;
572576 scope . audioServices . push ( frame ) ;
573577 i ++ ;
574578 }
804808 x = options . dotsubEmbed ? videoProcess . dotsubEmbed ( x , options ) : x ;
805809 x = options . liveleakEmbed ? videoProcess . liveleakEmbed ( x , options ) : x ;
806810 x = options . soundCloudEmbed ? audioProcess . soundcloudEmbed ( x , options ) : x ;
807- x = options . spotifyEmbed ? audioProcess . spotifyEmbed ( x ) : x ;
811+ x = options . spotifyEmbed ? audioProcess . spotifyEmbed ( x , options ) : x ;
808812 x = options . codepenEmbed ? codeEmbedProcess . codepenEmbed ( x , options ) : x ;
809813 x = options . jsfiddleEmbed ? codeEmbedProcess . jsfiddleEmbed ( x , options ) : x ;
810814 x = options . jsbinEmbed ? codeEmbedProcess . jsbinEmbed ( x , options ) : x ;
You can’t perform that action at this time.
0 commit comments