react native - Kaltura Android metadata -
i trying work out android native ui component including kaltura player instance (v3.0), loaded react native project. means using playkit (https://github.com/kaltura/playkit-android), , directions provided rn official site (https://facebook.github.io/react-native/docs/native-components-android.html).
i facing problem when rendering video, since first load fails reproduce video (gets stretched across view). however, if device gets rotated, video gets right. reason, planning use aspect ratio metadata, have not succeeded on front. there way of fetching information "player" class or "pkmediaconfig", instance?! like:
player player = playkitmanager.loadplayer(context, null); player.prepare(mediaconfig); new kalturaovpmediaprovider() .setsessionprovider(new simpleovpsessionprovider(baseurl, partnerid, ks)) .setentryid(entryid) .load(new onmedialoadcompletion() { @override public void oncomplete(final resultelement<pkmediaentry> response) { runonuithread(new runnable() { @override public void run() { if (response.issuccess()) { pkmediaconfig mediaconfig = new pkmediaconfig(); mediaconfig.setmediaentry(response.getresponse()); player.prepare(mediaconfig); player.play(); } else { log.e(tag, "error: failed fetch media data" + (response.geterror())); } } }); } });
i thinking of:
player.getaspectratio();
or,
mediaconfig.getmediaentry().getsources().get(0).getaspectratio();
unfortunately, there no getaspectratio() method whatsoever. thoughts?!
Comments
Post a Comment