語言

MediaDrm.ProvideKeyResponse(Byte[], Byte[]) 方法

定義

應用程式從授權伺服器接收金鑰回應,然後透過 provideKeyResponse 提供給 MediaDrm 實例。

[Android.Runtime.Register("provideKeyResponse", "([B[B)[B", "")]
public byte[]? ProvideKeyResponse(byte[] scope, byte[] response);
[<Android.Runtime.Register("provideKeyResponse", "([B[B)[B", "")>]
member this.ProvideKeyResponse : byte[] * byte[] -> byte[]

參數

scope
Byte[]

根據回應類型,可能是 sessionID 或 keySetId。 當回應是串流或離線金鑰請求時,範圍應設定為 sessionId。 當回應是釋放請求時,範圍應該設為 keySetId。

response
Byte[]

伺服器的位元組陣列回應

傳回

Byte[]

如果回應是離線請求,離線金鑰的 keySetId 會被回傳。 若回應是串流或發布請求,則會回傳一個空的位元組陣列。

屬性

例外狀況

若回應顯示需要重新配置

如果回應顯示伺服器拒絕了請求

備註

應用程式從授權伺服器接收金鑰回應,然後透過 provideKeyResponse 提供給 MediaDrm 實例。 當回應是離線金鑰請求時,會回傳一個 keySetId,之後可用來將金鑰還原到新會話中,使用該方法 #restoreKeys。 當回應是串流或釋放請求時,會回傳一個空的位元組陣列。

Java 文件 android.media.MediaDrm.provideKeyResponse(byte[], byte[])。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於