google cast - Chromecast - Chrome sender - How do you update media session on sender? -


after cast initialization, sender makes request load media on running receiver

var session = window.cast.framework.castcontext.getinstance().getcurrentsession(); ... session.loadmedia(loadrequest); 

then, receiver loads next media using mediamanager

    var mediamanager = new cast.receiver.mediamanager(mediaelement);     ...     mediamanager.load(loadrequestdata); // "loads media session on receiver without involvement of sender" 

i need update media session on sender side. how achieve this?

you can use session.stop , addupdatelistener end current media when 1 starts.

to stop, can use code snippet provided in docs:

function stopapp() {   session.stop(onsuccess, onerror); } 

you can check related so post reference. hope helps.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -