diff --git a/Shared/Player/Video Details/ChapterView.swift b/Shared/Player/Video Details/ChapterView.swift index f2646a64..8a5fc0d2 100644 --- a/Shared/Player/Video Details/ChapterView.swift +++ b/Shared/Player/Video Details/ChapterView.swift @@ -1,4 +1,3 @@ -import CoreMedia import Foundation import SDWebImageSwiftUI import SwiftUI @@ -24,15 +23,6 @@ import SwiftUI .contentShape(Rectangle()) } .buttonStyle(.plain) - .onReceive( - NotificationCenter.default - .publisher(for: .getTimeUpdatesNotification) - .receive(on: DispatchQueue.main) - ) { notification in - if let cmTime = notification.object as? CMTime { - player.updateTime(cmTime) - } - } } var verticalChapter: some View { diff --git a/Shared/Player/Video Details/VideoDetails.swift b/Shared/Player/Video Details/VideoDetails.swift index 1da9b6d8..7432dc40 100644 --- a/Shared/Player/Video Details/VideoDetails.swift +++ b/Shared/Player/Video Details/VideoDetails.swift @@ -1,3 +1,4 @@ +import CoreMedia import Defaults import Foundation import SDWebImageSwiftUI @@ -485,6 +486,15 @@ struct VideoDetails: View { .padding(.horizontal) } } + .onReceive( + NotificationCenter.default + .publisher(for: .getTimeUpdatesNotification) + .receive(on: DispatchQueue.main) + ) { notification in + if let cmTime = notification.object as? CMTime { + player.updateTime(cmTime) + } + } } }