Any idea what’s happening here I’m playing with video and as you can see its working great but the video goes…

Any idea what’s happening here I’m playing with video and as you can see its working great but the video goes outside of the custom view when in edit mode.

VideoView is set to match parent and so is the frame layout I also tried with a LinearLayout but same thing happened.

]]>

14 Commentsto Any idea what’s happening here I’m playing with video and as you can see its working great but the video goes…

  1. Anonymous says:

    < ![CDATA[

    Great, I like this πŸ™‚


    I think the video uses an hardware overlay for which the scaling is not applied but I have no idea why.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    No worrys I was just curious wasnt a bug report or anything that’s why its in discussion πŸ™‚

    ]]>

  3. Anonymous says:

    < ![CDATA[

    I believe it should work, for instance in the Youtube app the video can be scaled and moved in the corner, I don’t know why it’s different here πŸ™ Maybe some configuration when creating the view.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    It could also be my code I’m still not to good with this stuff.



    // Video Test



    LL.bindClass(“android.widget.FrameLayout“);


    LL.bindClass(“android.widget.VideoView“);


    LL.bindClass(“android.widget.MediaController“);




    var mctx = LL.getContext();


    var file = “/storage/emulated/0/Movies/BigCity1.mp4”;



    var fl = new LinearLayout(mctx);


    var flp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT);


    fl.setLayoutParams(flp);



    var vv = new VideoView(mctx);


    vv.setVideoPath(file);


    var vvp = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT);


    vv.setLayoutParams(vvp);


    fl.addView(vv);


    vv.start();



    var mc = new MediaController(mctx);


    vv.setMediaController(mc);



    return fl;

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Syntax highlighted by Google lol

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Has anyone figured this out yet? Same issue here. πŸ™

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Why the sad face? it doesn’t effect anything it only happens in edit mode.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Thanks for the response πŸ™‚


    I can’t get the videoview to appear at all sometimes, in and out of edit mode, and I also have randomly-aligned video controls (without video, but audio is there) at times – with the same video files that display video in odd places in edit mode… I’ll try to explain better after getting some sleep – but any advice for creating a video window (considering a WebView with html5, but I wanted to try alternate options first) would be greatly appreciated. Thanks πŸ™‚

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Weird :/ I never had those problems are you using my code or your own? I did this with a webview azwell I can’t remember if I posted the code or not though. If i did it will be posted under discussion.



    Btw I asked what would be the best way to display a large gif and Pierre suggested using a videoview because it would be more efficient and the animation would be smoother. So your probably better of sticking with that instead of a webview.

    ]]>

  10. Anonymous says:

    < ![CDATA[

    I’m using your code above, plus an extra binding… android.widget.LinearLayout… I can’t seem to find the above-mentioned videoview js code in your exchanges with Pierre… If you have a moment, I’d really appreciate anything you have in that department. From one Jay M. to another – Thanks πŸ™‚

    ]]>

  11. Anonymous says:

    < ![CDATA[

    I never posted the full videoview code this^ is just what I had at the time. Il check my TV when I get home but I don’t think I have it anymore, btw I just noticed the fifth line of this^ code is LinearLayout. IIRC I originally used a LinearLayout then later on I used search and replace to change Linear to Frame i must of forgot about replacing that line though.

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Na I don’t have it.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Jason Miller if you replace LinearLayout with FrameLayout the script should work ok, although it will still behaves trangely when scrolling and zooming the desktop.


    I just implemented a workaround which will improve the situation when scrolling the desktop, but unfortunately it will remain broken when zooming. Any scale different from 1 will result in a misplaced content. You may try this in the upcoming update.

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Just tried this again works great for me.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *