B4J Library MediaView library

Discussion in 'B4J Libraries & Classes' started by icefairy333, Jun 23, 2014.

  1. icefairy333

    icefairy333 Active Member Licensed User

    Code:
    Sub Process_Globals
        
    Private fx As JFX
        
    Private MainForm As Form
        
    Dim mp As MediaPlayer
        
    Dim mv As MediaView
        
    Dim msgbox As Msgboxes
    End Sub

    Sub AppStart (Form1 As Form, Args() As String)
        
    msgbox.Show("put test.mp4 beside me(under objects)","info")
        MainForm = Form1
        MainForm.Title=
    "play mp4 video"
        MainForm.SetFormStyle(
    "UNDECORATED")'no win title
        MainForm.WindowLeft=0
        MainForm.WindowTop=
    0
        MainForm.WindowHeight=fx.PrimaryScreen.MaxY
        MainForm.WindowWidth=fx.PrimaryScreen.MaxX
        mp.Initialize(
    "mp",File.geturi(File.DirApp,"test.mp4"))
        mv.init(
    "mv",MainForm.RootPane,mp)
        MainForm.Show
    End Sub
    Sub mv_onready
        
    Dim videowidth,videoheight As Double
        videowidth=mv.MediaInfo.width
        videoheight=mv.MediaInfo.height
        
    Log("media size:"&videoheight&"-"&videowidth)
        mv.FitHeight=videoheight
        mv.FitWidth=videowidth
        mp.Play
    End Sub
    Sub mp_Complete
        
    msgbox.Show("play completed!","Tips")
    End Sub
     

    Attached Files:

  2. maleche

    maleche Member Licensed User

    any documentation for this? works nice on my machine but, how can I load another video without using RemoveRootAt command. I am using the Complete event to load the next video, but I think it makes another instance instead of deleting older video or embedding the current one in the existing module.
    Thanks!
     
  3. icefairy333

    icefairy333 Active Member Licensed User

    I think it's in the same module.
     
  4. Douglas Farias

    Douglas Farias Expert Licensed User

    Last edited: Dec 8, 2014
  5. Kevin L. Johnson

    Kevin L. Johnson Member Licensed User

    Will this MediaView library run on the raspberry pi via b4j?
    Thanks
    Kevin
     
  6. icefairy333

    icefairy333 Active Member Licensed User

    it baseon jdk you can it by yourself.
     
  7. Douglas Farias

    Douglas Farias Expert Licensed User

    this lib works with streaming?
     
  8. marco.canta

    marco.canta Active Member Licensed User

    Is possible insert mediaview in a Pane ?
    and possible more Pane with more mediaview ?

    Thanks
    Marco
     
  9. cirollo

    cirollo Active Member Licensed User

    need too!
    I should show a logo beetween the movies....

    movie1 >> pause of 5 sec and logo show >> movie 2......

    how can I do it since media viewer is not a custo view??

    regards,
    cirollo
     
  10. techknight

    techknight Well-Known Member Licensed User

    This library isnt working with Panes. the javaobject version does.

    java.lang.ClassCastException: anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane cannot be cast to javafx.scene.layout.AnchorPane

    Since I havent seen any updates from this thread, I guess the library is abandoned at this point and should not be used.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice