public class PlayerUpdatedInfo {
- private String deviceId;
- private long videoHeight;
- private long videoWidth;
- private long audioSampleRate;
- private long audioChannels;
- private long audioBitsPerSample;
+ public String deviceId;
+ public long videoHeight;
+ public long videoWidth;
+ public long audioSampleRate;
+ public long audioChannels;
+ public long audioBitsPerSample;
}
export class PlayerUpdatedInfo
{
-
+
public internalPlayerUuid:string = ""
-
+
public deviceId:string = ""
-
+
public videoHeight:number = 0
-
+
public videoWidth:number = 0
-
+
public audioSampleRate:number = 0
-
+
public audioChannels:number = 0
-
+
public audioBitsPerSample:number = 0
}
__attribute__((visibility("default"))) @interface AgoraMediaPlayerUpdatedInfo : NSObject
@@ -69,7 +69,7 @@ public:
FPlayerUpdatedInfo(){}
FPlayerUpdatedInfo(const agora::media::base::PlayerUpdatedInfo& playerUpdatedInfo) {
-
+
internalPlayerUuid = UTF8_TO_TCHAR(playerUpdatedInfo.internalPlayerUuid);
deviceId = UTF8_TO_TCHAR(playerUpdatedInfo.deviceId);
videoHeight = playerUpdatedInfo.videoHeight;
@@ -95,11 +95,11 @@ public:
}
};
export class PlayerUpdatedInfo {
-
+
playerId?: string;
-
+
deviceId?: string;
-
+
cacheStatistics?: CacheStatistics;
}
public class PlayerUpdatedInfo : OptionalJsonParse
@@ -111,11 +111,11 @@ public:
public Optional<CacheStatistics> cacheStatistics = new Optional<CacheStatistics>();
}
export class PlayerUpdatedInfo {
-
+
playerId?: string;
-
+
deviceId?: string;
-
+
cacheStatistics?: CacheStatistics;
}
class PlayerUpdatedInfo {
diff --git a/dita/RTC-NG/API/class_rteplayerinfo.dita b/dita/RTC-NG/API/class_rteplayerinfo.dita
index 2cd9a5d2fe2..b5a113dde5e 100644
--- a/dita/RTC-NG/API/class_rteplayerinfo.dita
+++ b/dita/RTC-NG/API/class_rteplayerinfo.dita
@@ -6,21 +6,7 @@
- public class PlayerInfo {
- public int state();
- public long duration();
- public int streamCount();
- public boolean hasAudio();
- public boolean hasVideo();
- public boolean isAudioMuted();
- public boolean isVideoMuted();
- public int videoHeight();
- public int videoWidth();
- public Constants.AbrSubscriptionLayer abrSubscriptionLayer();
- public int audioSampleRate();
- public int audioChannels();
- public int audioBitsPerSample();
-}
+
@interface AgoraRtePlayerInfo : NSObject
- (int)state;
@@ -36,22 +22,9 @@
- (int)audioSampleRate;
- (int)audioChannels;
- (int)audioBitsPerSample;
+- (NSString \* _Nullable)currentUrl;
@end
- typedef struct RtePlayerInfo {
- RtePlayerState state;
- size_t duration;
- size_t stream_count;
- bool has_audio;
- bool has_video;
- bool is_audio_muted;
- bool is_video_muted;
- int video_height;
- int video_width;
- RteAbrSubscriptionLayer abr_subscription_layer;
- int audio_sample_rate;
- int audio_channels;
- int audio_bits_per_sample;
-} RtePlayerInfo;
+
@@ -66,7 +39,7 @@
-
+
@@ -75,71 +48,125 @@
duration
- 预留参数。
+ 媒体资源的时长(ms)。
- stream_count
- streamCount
- 预留参数。
+ streamCount
+ 媒体流的数量。
- has_audio
- hasAudio
- URL 媒体流中是否存在音频流:
-
+ hasAudio
+ URL 媒体流中是否包含音频流:
+
- has_video
- hasVideo
- URL 媒体流中是否存在视频流:
-
+ hasVideo
+ URL 媒体流中是否包含视频流:
+
- is_audio_muted
- isAudioMuted
- 本地用户是否订阅了音频流:
-
+ isAudioMuted
+ 播放器是否停止接受音频流:
+
- is_video_muted
- isVideoMuted
- 本地用户是否订阅了视频流:
-
+ isVideoMuted
+ 播放器是否停止接受视频流:
+
- video_height
- videoHeight
+ videoHeight
视频帧的高度(px)。
- video_width
- videoWidth
+ videoWidth
视频帧的宽度(px)。
- abr_subscription_layer
- abrSubscriptionLayer
+ abrSubscriptionLayer
订阅的视频流的质量级别。在自适应码率(ABR)视频流中,不同的质量级别对应不同的分辨率和码率,详见 。
- audio_sample_rate
- audioSampleRate
+ audioSampleRate
音频采样率(Hz)。
- audio_channels
- audioChannels
+ audioChannels
音频声道数。
- audio_bits_per_sample
- audioBitsPerSample
- 预留参数。
+ audioBitsPerSample
+ 每个音频采样点的位数(bit)。
+
+
+ currentUrl
+ 当前正在播放的 URL。
-
+
+ 方法
+
+
+ state
+ 获取播放器当前的状态。详见 。
+
+
+ duration
+ 获取媒体资源的时长(ms),详见 。
+
+
+ streamCount
+ 获取媒体流的数量,详见 。
+
+
+ hasAudio
+ 获取 URL 媒体流中是否包含音频流,详见 。
+
+
+ hasVideo
+ 获取 URL 媒体流中是否包含视频流,详见 。
+
+
+ isAudioMuted
+ 获取播放器是否停止接受音频流,详见 。
+
+
+ isVideoMuted
+ 获取播放器是否停止接受视频流,详见 。
+
+
+ videoHeight
+ 获取视频帧的高度(px),详见 。
+
+
+ videoWidth
+ 获取视频帧的宽度(px),详见 。
+
+
+ abrSubscriptionLayer
+ 获取订阅的视频流的质量级别,详见 。
+
+
+ audioSampleRate
+ 获取音频采样率(Hz),详见 。
+
+
+ audioChannels
+ 获取音频声道数,详见 。
+
+
+ audioBitsPerSample
+ 获取每个音频采样点的位数(bit),详见 。
+
+
+ currentUrl
+ 获取当前正在播放的 URL,详见 。
+
+
+
+