Skip to content

Played and stopped events not fired in Unity Editor #38

@GiuseppePiscopoHypex

Description

@GiuseppePiscopoHypex

Describe the issue
We have an existing Unity project using HisPlayer. A WebGL project. The issue arises only when running in Unity Editor. It does not happen when the WebGL build runs within the web page.

  1. When code in HISPlayerManager-derived class calls Play(...), playback starts but no Played event is logged nor triggered. For clarity, HISPlayerCtrl is the mentioned derived class. We added logs before calls to HISPlayerManager instance methods.

    [HISPlayerCtrl] invoking Seek on index 0 to position 0
    HISPLAYER: EventPlaybackSeek
    
    [HISPlayerCtrl] invoking Play on index 0
    # no HISPLAYER log here!
    
  2. When clip ends, no event is triggered at all. No Stopped, Paused, EndOf....

  3. When clip is ended, and (due to existing application logic) code anyway calls Stop(...), some events are logged/triggered:

    [HISPlayerCtrl] invoking Stop on index 0
    HISPLAYER: EventPlaybackSeek
    HISPLAYER: EventPlaybackStopped
    

Your system and development environment:

To Reproduce
Steps to reproduce the issue:

  1. Play a stream programmatically with HISPlayerManager.Play(...)
    • Played event should trigger. It does not.
  2. Wait for clip playback ending
    • Stopped event should trigger. It does not.

Screenshots

It does not seem applicable.

Things we tried

  • We tried both with an M3U8 URL as well as an MP4 URL. No change.
  • We tried deleting Library and obj directories. No change.
  • We tried reverting back repository history to several commits, in case it was somehow due to our code. No change. Specifically we reverted to a release commit where the issue for sure did not happen in editor at the time. And instead now the issue happens anyway.
  • We tried opening project on different development machines, where the issue was not present before, and the project was not being opened for a while, and it is now present.
  • Already mentioned: run in the editor -> issue; run in web page -> no issue
  • Already mentioned: upgrading from 4.9.2 to 4.11.0. No change.

As you can imagine this issue is harming our development workflow. Is there anything else we can try within our project? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions