How to play Ooyala video in hook player from a different application?
public class MainActivity extends Activity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent launchHook = new Intent(Intent.ACTION_VIEW, Uri.parse
(<"ooyala://pcode/embed code/null/time_in_seconds">));
startActivity(launchHook);
}
}
The Ooyala Documentation is incorrect, to create an intent to open an ooyala video in "Hook Mobile Player App" must be (without "<" and ">" characters):
public class MainActivity extends Activity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent launchHook = new Intent(Intent.ACTION_VIEW, Uri.parse("ooyala://pcode/embed code/null/time_in_seconds"));
startActivity(launchHook);
}
}
where:
- pcode: video player_id defined in Ooyala Backlot.
- embed code: video content_id defined in Ooyala Backlot.
- null: valid token or the string "null", not required.
- time_in_seconds: time in seconds to specify the point in the video to start the app, not required.
Intent launchHook = new Intent(Intent.ACTION_VIEW, Uri.parse("ooyala://c9565052281a402ebf432dca9b59b2ca/45cjJ0ZDrfOUerwSu6BbChfItUCDCxZE"));
// Intent launchHook = new Intent(Intent.ACTION_VIEW, Uri.parse("ooyala://c9565052281a402ebf432dca9b59b2ca/45cjJ0ZDrfOUerwSu6BbChfItUCDCxZE/null/10"));
startActivity(launchHook);