From 6a634fa636643eba7970e95d5503630a2ffd0838 Mon Sep 17 00:00:00 2001 From: Aiden Vigue Date: Sun, 23 May 2021 23:47:19 -0400 Subject: [PATCH] debug --- JellyfinPlayer/DeviceProfileBuilder.swift | 3 ++- JellyfinPlayer/VideoPlayerView.swift | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/JellyfinPlayer/DeviceProfileBuilder.swift b/JellyfinPlayer/DeviceProfileBuilder.swift index e0c9ecac..d67b1489 100644 --- a/JellyfinPlayer/DeviceProfileBuilder.swift +++ b/JellyfinPlayer/DeviceProfileBuilder.swift @@ -166,7 +166,8 @@ class DeviceProfileBuilder { SubtitleProfiles.append(_AVSubtitleProfile(Format: "ssa", Method: "External")) SubtitleProfiles.append(_AVSubtitleProfile(Format: "pgssub", Method: "Embed")) SubtitleProfiles.append(_AVSubtitleProfile(Format: "sub", Method: "Embed")) - SubtitleProfiles.append(_AVSubtitleProfile(Format: "srt", Method: "External")) + SubtitleProfiles.append(_AVSubtitleProfile(Format: "subrip", Method: "Embed")) + SubtitleProfiles.append(_AVSubtitleProfile(Format: "srt", Method: "Embed")) let ResponseProfiles: [_AVResponseProfile] = [_AVResponseProfile(Type: "Video", Container: "m4v", MimeType: "video/mp4")] diff --git a/JellyfinPlayer/VideoPlayerView.swift b/JellyfinPlayer/VideoPlayerView.swift index 7abde101..47f5df89 100644 --- a/JellyfinPlayer/VideoPlayerView.swift +++ b/JellyfinPlayer/VideoPlayerView.swift @@ -221,6 +221,8 @@ struct VideoPlayerView: View { _streamLoading.wrappedValue = true; let url = (globalData.server?.baseURI ?? "") + "/Items/\(item.Id)/PlaybackInfo?UserId=\(globalData.user?.user_id ?? "")&StartTimeTicks=\(Int(item.Progress))&IsPlayback=true&AutoOpenLiveStream=true&MaxStreamingBitrate=\(DeviceProfile.DeviceProfile.MaxStreamingBitrate)"; + print(url) + let request = RestRequest(method: .post, url: url) request.headerParameters["X-Emby-Authorization"] = globalData.authHeader @@ -238,6 +240,7 @@ struct VideoPlayerView: View { if(json["MediaSources"][0]["TranscodingUrl"].string != nil) { print("Transcoding!") let streamURL: URL = URL(string: "\(globalData.server?.baseURI ?? "")\((json["MediaSources"][0]["TranscodingUrl"].string ?? ""))")! + print(streamURL) let item = PlaybackItem(videoType: VideoType.hls, videoUrl: streamURL, subtitles: []) let disableSubtitleTrack = Subtitle(name: "Disabled", id: -1, url: URL(string: "https://example.com")!, delivery: "Embed") _subtitles.wrappedValue.append(disableSubtitleTrack);