No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    q-video events

    Help
    4
    10
    588
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vinnyc last edited by

      Hi folks, is it possible to receive events from the q-video component? I was reading the API here: https://developers.google.com/youtube/iframe_api_reference?csw=1 and it seems its possible to have events from the iframe player.

      So I tried

            <q-video
              :ratio="16/9"
              :src="embedUrl(video.id)"
              @v-on:onStateChange="changeState"
            ></q-video>
      

      But its not working. Any way to capture when a video started playing event?

      Thank you

      I 1 Reply Last reply Reply Quote 0
      • I
        Ilia @vinnyc last edited by

        @vinnyc All native events seem to be propagated, so should be working. Have you tried @v-on:stateChange=“changeState” by any chance?

        1 Reply Last reply Reply Quote 0
        • V
          vinnyc last edited by

          @Ilia tried that too, won’t work either, but thanks for the suggestion 🙂

          1 Reply Last reply Reply Quote 0
          • Hawkeye64
            Hawkeye64 last edited by Hawkeye64

            @vinnyc This is wrong: @v-on:onStateChange="changeState"
            Either use: v-on:onStateChange="changeState"
            or use: @onStateChange="changeState"

            @ is an alias for v-on, so you essentially had v-onv-on

            1 Reply Last reply Reply Quote 1
            • V
              vinnyc last edited by vinnyc

              On the copy/past frenzy I did not noticed that I pasted it wrong:

               <q-video
                      :ratio="16/9"
                      :src="embedUrl(video.id)"
                      @onStateChange="changeState"
                    ></q-video>
              

              or

                <q-video
                      :ratio="16/9"
                      :src="embedUrl(video.id)"
                      v-on:onStateChange="changeState"
                    ></q-video>
              

              Are both not working folks

              R 1 Reply Last reply Reply Quote 0
              • V
                vinnyc last edited by

                Well at least the method never gets called for things like play/pause/volume change, which is what I was expecting, maybe I misunderstood the OnStateChange method?

                1 Reply Last reply Reply Quote 0
                • Hawkeye64
                  Hawkeye64 last edited by

                  I don’t know YouTube api. I presume onStateChange comes from them?

                  1 Reply Last reply Reply Quote 0
                  • R
                    rhscjohn @vinnyc last edited by

                    @vinnyc This may or may not be of help. This is a list of Media Events that should be available to q-video. My understanding is that q-video is just a wrapper around HTML5 video.

                    I quickly outgrew HTML5 video and moved on to videojs.

                    1 Reply Last reply Reply Quote 0
                    • Hawkeye64
                      Hawkeye64 last edited by Hawkeye64

                      @rhscjohn

                      My understanding is that q-video is just a wrapper around HTML5 video.

                      Yeah, that’s not true. QMediaPlayer is. QVideo is basically just an iFrame needed for embedding things like YouTube (at least, that was the intension). The name is slightly misleading. Also to note, QMediaPlayer doesn’t do YouTube as YouTube have their own protocols.

                      1 Reply Last reply Reply Quote 0
                      • V
                        vinnyc last edited by

                        Thank you all for the help. @Hawkeye64 yes from my understanding of youtube’s api that’s the method, but looks like you need to register for the event to be propagated.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post