Wish [BANano] Audio player

Discussion in 'B4J Bugs & Wishlist' started by GanjaKyp, Apr 17, 2019 at 3:40 PM.

  1. GanjaKyp

    GanjaKyp Member

    joulongleu likes this.
  2. Kiffi

    Kiffi Active Member Licensed User

    just a little help for getting started:

    Code:
    Sub Process_Globals
       
        
    Private BANano As BANano
       
    End Sub

    Sub AppStart(Form1 As Form, Args() As String)

        BANano.Initialize(
    "BANanoHowler""BANanoHowler"DateTime.Now)
       
        BANano.UseServiceWorker = 
    False
       
        BANano.Header.Title = 
    "BANanoHowler"

        BANano.Header.AddJavascriptFile(
    "https://cdnjs.cloudflare.com/ajax/libs/howler/2.1.1/howler.min.js")

        BANano.Build(
    "C:\inetpub\wwwroot\BANano\"' <- adjust to your own needs!

        
    ExitApplication

    End Sub

    Sub BANanoHowler_Ready()

        
    Dim cmdPlay As BANanoElement = BANano.GetElement("body").Append($"<button id="cmdPlay">Play</play>"$).Get("#cmdPlay")

        cmdPlay.On(
    "click", Me, "cmdplay_click")
       
    End Sub

    Sub cmdPlay_Click(BE As BANanoEvent)

        BANano.GetElement(
    "#cmdPlay").SetAttr("disabled"True)
       
        
    Dim sound As BANanoObject
        sound.Initialize2(
    "Howl", CreateMap("src""http://rfcmedia.streamguys1.com/MusicPulse.mp3""html5"True))
        sound.RunMethod(
    "play"Null)

    End Sub
    Greetings ... Peter (Not responsible for the quality of the music ;))
     
    joulongleu and alwaysbusy like this.
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