0

The case is rater simple. Am using kalturas Android referance app and i want my videos to auto play.

For this there is several API hooks: Kaltura KDP API Compatibility

What i come up to is that i want to use event jsCallbackReady and event listener entryReady to send notification doPlay and that i want to put this code in PlayerViewController.java

The issue is that i can't get it to work, I can't grep how to work with this API within the reference application.Have tested uncountable setups and have searched every corner on internet to find any hands on information / examples that would get me going in the right direction but found nothing.

Really need someone to give a hands on example how to accomplish this.

Mathias Asberg
  • 3,562
  • 6
  • 30
  • 46

2 Answers2

0

Could you paste few of your code lines from what you have so far with the classes that you are using ? If I'm not mistaken the code should be at the PlayerInterface rather than the PlayerView

0

The working solution to this was this code.

 final PlayerViewController  mPlayerView = (PlayerViewController) findViewById( R.id.custom_player );

 // Autoplay video
                  mPlayerView.registerJsCallbackReady(new KPlayerJsCallbackReadyListener() {
                      @Override
                      public void jsCallbackReady() {
                          mPlayerView.play();

                      }
                  });

Added here (Github)

Mathias Asberg
  • 3,562
  • 6
  • 30
  • 46