1
votes

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.

1
what is your usecase? If you simply want to play a movie that you fetch on the receiver side, you can just put the source of your video element to the url that you fetch and call play on the video element; after all, the MediaManager does a similar thing for you. If you then need more and want to control the video from your sender, that is different; let us know what you have in mind.Ali Naddaf

1 Answers

1
votes

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.