Domanda

I would like to have the sender app send only an ID value for a video using the messageBus and then have the receiver make an asynchronous call to get the data from an API and play the video. Is this possible? I know I can send the message to the receiver and asynchronously call for the data, but then I don't know what I can do with it. I don't see a method for the MediaManager that would allow the receiver to send a "load" command.

Any help or examples would be appreciated.

È stato utile?

Soluzione

Thanks for responding Ali. I figured it out. Here is what I am doing:

Sender: I am sending the ID as the "contentId" (instead of a video url) in the loadMedia method.

Receiver: I added the ansynchronous call to the beginning of the "onLoad" event and then overwrite the data['media']['contentId'] value with the URL of the video.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top