Improve playback, preroll and TV experience
This commit is contained in:
@@ -297,12 +297,16 @@ func (c *Client) PlaybackInfo(
|
||||
"UserId": {cred.UserID},
|
||||
"IsPlayback": {"true"},
|
||||
}
|
||||
profile := androidTVDeviceProfile(capabilities)
|
||||
if forceTranscode {
|
||||
forceH264TranscodeProfile(profile)
|
||||
}
|
||||
body, err := json.Marshal(map[string]any{
|
||||
"Id": itemID, "UserId": cred.UserID, "IsPlayback": true,
|
||||
"StartTimeTicks": startTicks, "EnableDirectPlay": !forceTranscode,
|
||||
"EnableDirectStream": !forceTranscode, "EnableTranscoding": true,
|
||||
"AllowVideoStreamCopy": true, "AllowAudioStreamCopy": true,
|
||||
"DeviceProfile": androidTVDeviceProfile(capabilities),
|
||||
"AllowVideoStreamCopy": !forceTranscode, "AllowAudioStreamCopy": true,
|
||||
"DeviceProfile": profile,
|
||||
})
|
||||
var requestBody map[string]any
|
||||
if err == nil {
|
||||
@@ -314,10 +318,6 @@ func (c *Client) PlaybackInfo(
|
||||
if currentPlaySessionID != "" {
|
||||
requestBody["CurrentPlaySessionId"] = currentPlaySessionID
|
||||
}
|
||||
if forceTranscode {
|
||||
profile := requestBody["DeviceProfile"].(map[string]any)
|
||||
profile["DirectPlayProfiles"] = []map[string]string{}
|
||||
}
|
||||
if err == nil {
|
||||
body, err = json.Marshal(requestBody)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user