Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET media player
How do I make sure VLC buffers to 5% before playing in VB.NET?
So far I can play clips one after the other. But what I'd like to do, is make sure before begins playing each time 5% of the video from the point in video so far is added to buffer. So as to not randomly pause if download speed slows.
 
I don't know how to do this, so help would be much appreciated. Thanks
 
Reason for doing this:
Sometimes player will randomly pause whilst watching making playback really irritating.
 
Code so far:
Public Class Form1
    Dim Paused As Boolean = False
    Dim Started As Boolean = False
    Dim PlayedSecond As Boolean = True
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        PlayedSecond = False
        AxVLCPlugin21.playlist.items.clear()
        AxVLCPlugin21.playlist.add("https://vula.uct.ac.za/access/content/group/fe879ca4-927a-4fca-9cc9-33b12c348b37/vids/Lessig-ItIsAboutTimeGettingOurValuesAroundCopyright522.flv")
        AxVLCPlugin21.playlist.play()
        Started = True
    End Sub
 
    Sub playsecond()
            AxVLCPlugin21.playlist.items.clear()
            AxVLCPlugin21.playlist.add("http://lsta2011.wikispaces.com/file/view/Rogue%20Waves.mp4")
            AxVLCPlugin21.playlist.play()
            PlayedSecond = True
            Started = False
    End Sub
 
    Private Sub AxVLCPlugin21_pause(sender As Object, e As EventArgs) Handles AxVLCPlugin21.pause
            Paused = True
    End Sub
 
    Private Sub IsFinished_Tick(sender As Object, e As EventArgs) Handles IsFinished.Tick
        If Not AxVLCPlugin21.playlist.isPlaying And Paused = False And Started = True And PlayedSecond = False Then
            playsecond()
            Started = True
        End If
    End Sub
 
    Private Sub AxVLCPlugin21_play(sender As Object, e As EventArgs) Handles AxVLCPlugin21.play
        Paused = False
    End Sub
End Class
Posted 27-Jan-13 6:25am
Edited 27-Jan-13 6:59am
(no name)499K
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 DamithSL 295
1 OriginalGriff 214
2 BillWoodruff 170
3 Zoltán Zörgő 165
4 Maciej Los 113
0 OriginalGriff 7,760
1 DamithSL 5,874
2 Sergey Alexandrovich Kryukov 5,444
3 Maciej Los 5,076
4 Kornfeld Eliyahu Peter 4,539


Advertise | Privacy | Mobile
Web03 | 2.8.141223.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100