File tree Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Expand file tree Collapse file tree 1 file changed +0
-28
lines changed Original file line number Diff line number Diff line change 5959 return elems ;
6060 }
6161
62- // update application name field
63- function updateAppName ( str ) {
64- try {
65- // retrieve the right div - it's inside two shadowRoot(s) so we need a special selector
66- const mdivTab = querySelectorDeep ( 'cast-media-player::shadow tv-overlay::shadow div.playback-logo' )
67- if ( mdivTab . length > 0 ) {
68- const mdiv = mdivTab [ 0 ]
69- // update text
70- mdiv . innerHTML = str
71- // update color
72- mdiv . style . color = 'rgba(255,255,255,0.4)'
73- }
74- } catch ( err ) {
75- console . warn ( "updateAppName error" , err )
76- }
77- }
78-
7962 // update metadata
8063 function updateMetadata ( metaData ) {
8164 try {
10184 }
10285 )
10386
104- // Sender LOAD request
105- playerManager . setMessageInterceptor (
106- cast . framework . messages . MessageType . LOAD , data => {
107- console . log ( "MSG:LOAD" , data )
108- // update AppName with data.media.customData.deviceName if any
109- if ( data && data . media && data . media . customData && data . media . customData . deviceName )
110- updateAppName ( data . media . customData . deviceName )
111- return data
112- }
113- )
114-
11587 context . start ( ) ;
11688
11789 </ script >
You can’t perform that action at this time.
0 commit comments