VideoPlayer Plugin Totaltime not working inside cocoon / cordova

  • Hi,

    We're actually working on a 360 player inside cocoon/cordova for android and iOS.

    But we're having trouble making the timeline work, as it seems that the variable :

    plugin[video].totaltime


    is always equal to 0 or not working properly when embedded in the chromium webview+ of cocoon ( crosswalk based ).

    plugin[video].time appears fine, and we can scrub the video as well. But the timeline display is stuck at the beginning and totaltime displays 0


    We're using krpano-1.19-pr13 base example videopano xml file -> videointerface.xml

    Any idea if this error comes from our xml or can be a consequence of the integration inside cocoon ?

    Is there a workaround ?

    Thanks in advance.

    Cheers,
    E

  • Hi,

    the videotime could be normally only 0 when:

    - the browser isn't sending progress events for the HTML5 video
    - there is no buffered information in the HTML5 video
    - or when the HTML5 video duration itself is 0

    But all this cases shouldn't be possible in a well-working browser!

    That's all I could say for the moment...
    About cocoon/cordova I don't have any knowledge...

    Best regards,
    Klaus

  • Hi Klaus,

    Thanks a lot for the very detail answer.
    We have also open a post on cocoon forum :
    https://forums.cocoon.io/t/why-krpano-v…on-webview/6515


    From what i have test :
    - our krpano app works perfectly when lunch on a local node.js server.
    - when we replace the totaltime var manually by using set(t2, 183); all works perfectly in cocoon webview+.

    So krpano is unable to access the video info of cocoon webview+ DOM.

    Cocoon webview+ is base on crosswalk which is not maintain anymore,
    and many post on cocoon forum hightlight the fact that support and maintenance of cocoon is not as good as it was in the past.

    So my bet is that the weak point is coming from cocoon and not krpano.
    We will also need an ios app running in a webview+ but again it look that cocoon is also not supporting this anymore.
    https://forums.cocoon.io/t/is-webview-s…d-on-ios/6514/2


    My bet is that we have to ditch cocoon / cordova / crosswalk from the equation and try to lunch our app directly in the android java webview,
    by using android studio.

    After some test our app run perfectly by using android studio directly, timeline is ok !
    BUT now we have lost gyroscopic viewing. After activating all we can we are still stuck with the gyro info not communicating with krpano.
    Do you know if it's possible to access gyro data in the native android webview ?

    The doc mention Older Webkit-based Android browsers
    https://krpano.com/plugins/gyro2/#top


    But since android lolipop the last version of chrome webview is included by default in the native webview, so it could work i guess ?

    Thanks again for your time.
    Cheers
    E

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!