Skip to content

isStarted on RemoteVideoTrack is intermittently false #2064

@funayamateppei

Description

@funayamateppei
  • I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in the CHANGELOG.md.
  • I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • I verified that the Quickstart application works in my environment.
  • I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Code to reproduce the issue:

About one out of every twenty times the RemoteVideoTrack.isStarted is false and no video is displayed.
On the other occasions when it works, isStarted = true

When the bug reoccurs
When the RemoteParticipant publishes a video, the trackSubscribed event is detected, but the RemoteVideoTrack.isStarted returned at that time is false.
In such cases, the trackUnpublished event is immediately detected.
On the publishing side, unpublish is not being called.
→ no video is displayed because there is no video to attach.

Under what conditions does isStarted return false?
Additionally, why does the trackUnpublished event fire in such cases, immediately after the trackSubscribed event is detected?
(It has also been confirmed that the trackUnsubscribed event fires.)

    // Set when RemoteParticipant is joined
    // participant: RemoteParticipant
    participant.on("trackSubscribed", (t) => {
      console.log("🔥: received trackSubscribed event\n")
      console.dir(t, {depth: null})
    })

    participant.on("trackUnpublished", (t) => {
      console.log("💧: received trackUnpublished event\n")
      console.dir(t, {depth: null})
    })

The isStarted value of the track on the publishing side was true at the time of reproduction, and it was published without any issues.
I also subscribed to the trackPublicationFailed event, but it did not fire.

    console.log(track.isStarted)
    await localParticipant.publishTrack(track)

Log
スクリーンショット 2024-11-28 18 49 58

The RemoteTrack output from trackSubscribed

{
    "sid": "MT8a92a894e7b116512de39af0bf1c4e50",
    "priority": null,
    "isSwitchedOff": false,
    "isEnabled": true,
    "processor": null,
    "dimensions": {
        "height": null,
        "width": null
    },
    "processedTrack": null,
    "mediaStreamTrack": {},
    "isStarted": false,
    "name": "acdfa356-f5b0-4c5d-b9df-52b2adfa9f1f",
    "kind": "video"
}

The RemoteTrackPublication output from trackUnpublished

{
    "track": null,
    "publishPriority": "standard",
    "kind": "video",
    "isTrackEnabled": true,
    "isSubscribed": false,
    "trackSid": "MT8a92a894e7b116512de39af0bf1c4e50",
    "trackName": "acdfa356-f5b0-4c5d-b9df-52b2adfa9f1f"
}

Expected behavior:

  • RemoteVideoTrack.isStarted = true

Actual behavior:

  • RemoteVideoTrack.isStarted = false

Software versions:

  • Browser(s): chrome(mobile)
  • Operating System: iPhone15, iOS18.1.1
  • twilio-video.js: 2.27.0
  • Third-party libraries (e.g., Angular, React, etc.): React

Metadata

Metadata

Assignees

Labels

needs more informationIssues that require more information to resolve, such as Room SIDs, SDK versions, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions