iOS Question VideoPlayer Sensing Play/Pause Change

Discussion in 'iOS Questions' started by gregchao, Apr 21, 2019.

  1. gregchao

    gregchao Member Licensed User

    Is there anyway to sense when VideoPlayer changes from play to pause or visa versa?
  2. Erel

    Erel Administrator Staff Member Licensed User

    Try this:
    Dim no As NativeObject = VideoPlayer1
    Dim state As Int = no.GetField("controller").GetField("player").GetField("timeControlStatus").AsNumber
    Should return 0 for paused and 2 for playing. You can use a timer to monitor it.
    Last edited: Apr 23, 2019
  3. gregchao

    gregchao Member Licensed User

    I replaced "NativePlayer" with "NativeObject" and it worked. Thanks.
    Erel likes this.
  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