alibaba / alibaba/CicadaPlayer

trackBitrate and bufferedPosition are always 0 for RTMP

Open
#535 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
771
Forks
209
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When reproducing an RTMP stream both trackBitrate and bufferedPosition are always 0.
It works as expected when reproducing HLS for instance.

To get these values i'm accessing them like this:
```swift
let bitrate = player.getCurrentTrack(CicadaTrackType(rawValue: 0))?.trackBitrate
let buffer = player.bufferedPosition
```

**To Reproduce**
Steps to reproduce the behavior:
1. Just open any RTMP stream

**Expected behavior**
We should get the current values for bitrate and buffer as we do for HTTP streams.

Also I have one more question, is there any way to obtain bandwidth information for the current stream? Couldn't find anything in the public API.

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing an RTMP stream and inspect the player.getCurrentTrack(CicadaTrackType(rawValue: 0))?.trackBitrate and player.bufferedPosition entry points, comparing their behavior with HLS or other HTTP streams. Done means RTMP reports current bitrate and buffered position consistently, with the bandwidth question addressed if supported by the public API.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, swift
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.