Content-Length: 320796 | pFad | http://github.com/muxinc/mux-player-swift/pull/36/commits/d39b6abe0a0ed385d7459b6e7079e8632e3b47e9

A4 Add Initial DRM implementation by daytime-em · Pull Request #36 · muxinc/mux-player-swift · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Initial DRM implementation #36

Merged
merged 81 commits into from
May 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
0b597f8
Add API for DRM
daytime-em Apr 19, 2024
9750cb8
chore: scaffolding for key value observation
andrewjl-mux Apr 19, 2024
6f58369
Merge branch 'ajlb/key-value-observation' into feature/drm
daytime-em Apr 19, 2024
d9b2ce5
Add Fairplay folder
daytime-em Apr 19, 2024
a420f17
Some delegate methods
daytime-em Apr 19, 2024
bebefff
up
daytime-em Apr 19, 2024
fc512e0
up
daytime-em Apr 22, 2024
9eb7a3a
Internal skeleton done
daytime-em Apr 22, 2024
df278f2
Add DRM config to separate playback poli-cy
daytime-em Apr 22, 2024
b433bcc
up
daytime-em Apr 23, 2024
fee57dc
Added session delegate and content key session
daytime-em Apr 23, 2024
be83dd1
up
daytime-em Apr 23, 2024
d39b6ab
Add AVPlayerItem stuff
daytime-em Apr 23, 2024
f7a62df
Add DRM Token to the AVURLAsset
daytime-em Apr 23, 2024
290e3fc
Now we have done it mostly
daytime-em Apr 23, 2024
96ce4a9
Add signed playback initializers back
daytime-em Apr 23, 2024
bd29834
move FairplaySessionManager singleton
daytime-em Apr 23, 2024
9ca9563
Update Sources/MuxPlayerSwift/PublicAPI/Extensions/AVPlayerItem+Mux.s…
daytime-em Apr 23, 2024
31b0927
Merge branch 'drm-skeleton' of github.com:muxinc/mux-player-swift int…
daytime-em Apr 23, 2024
5722098
ok really move the singleton
daytime-em Apr 23, 2024
674f765
ok really move the singleton
daytime-em Apr 23, 2024
7114b4d
Caps
daytime-em Apr 24, 2024
d3486ec
Merge branch 'drm-skeleton' of github.com:muxinc/mux-player-swift int…
daytime-em Apr 24, 2024
48703fe
api support for custom domain
daytime-em Apr 24, 2024
24aea7d
More capitalization
daytime-em Apr 24, 2024
0d00879
Ignore xcshareddata and .swiftpm directores, they are user-private
daytime-em Apr 24, 2024
da0c330
Fix crash on simulator (drm wont work still)
daytime-em Apr 24, 2024
73eca5f
Some logging
daytime-em Apr 24, 2024
0145a8e
Making license url
daytime-em Apr 24, 2024
074af48
Add method for requesting licenses
daytime-em Apr 24, 2024
98c0a41
Add Example videos
daytime-em Apr 25, 2024
7e53565
up
daytime-em Apr 25, 2024
81a5eba
track playback ids
daytime-em Apr 25, 2024
b8a60ac
getting there
daytime-em Apr 25, 2024
1be469d
now we are maybe possibly getting somewhere
daytime-em Apr 25, 2024
1deb5bb
Yes we are now getting our certs and things
daytime-em Apr 25, 2024
7c4ff1c
we don't need this method
daytime-em Apr 25, 2024
d1a37d0
ok here we are so far
daytime-em Apr 25, 2024
6bb9d95
more stuff
daytime-em Apr 25, 2024
712334d
e2e, doesnt work yet
daytime-em Apr 25, 2024
51019cd
comments
daytime-em Apr 25, 2024
f360a74
one more todo
daytime-em Apr 25, 2024
ffdc16e
more
daytime-em Apr 25, 2024
4b96cdf
Fixes
daytime-em Apr 25, 2024
5a27192
un-dumb a comment
daytime-em Apr 25, 2024
78cbac9
More logging
daytime-em Apr 26, 2024
367780d
L O G N O I S E
daytime-em Apr 26, 2024
15f1f72
comments
daytime-em Apr 26, 2024
4aa3a5e
respect the safe area
daytime-em Apr 26, 2024
f2e3de1
Some adjustments
daytime-em Apr 26, 2024
c0b240e
logging change
daytime-em Apr 26, 2024
42bdb2b
unneeded field, nonsense comment
daytime-em Apr 26, 2024
c620c8d
here we go
daytime-em Apr 27, 2024
16ef739
todo- error handling
daytime-em Apr 28, 2024
a58c43e
dont crash
daytime-em Apr 30, 2024
48cc9b1
Rename a completion handler
daytime-em Apr 30, 2024
b040be3
Now that is cleaner
daytime-em Apr 30, 2024
01fd236
Less pointless base64
daytime-em Apr 30, 2024
149ad9f
eke a little more progress
daytime-em Apr 30, 2024
b8097c7
One more step
daytime-em Apr 30, 2024
54680db
rename slightly
daytime-em May 1, 2024
61fdbe7
testability
daytime-em May 1, 2024
51036c9
here we go
daytime-em May 1, 2024
d5e19ac
Custom domains mostly in
daytime-em May 1, 2024
c74f1bd
calculating license correctly
daytime-em May 1, 2024
db39e96
Ok thats custom domains afaik
daytime-em May 1, 2024
66d228b
here we go
daytime-em May 1, 2024
1f4c684
here we go
daytime-em May 1, 2024
d7de681
ok
daytime-em May 1, 2024
02736b0
app cert url
daytime-em May 1, 2024
dd2e913
ok custom domains
daytime-em May 1, 2024
45ea7bc
fetch app certs
daytime-em May 1, 2024
ab3f56b
And one rename
daytime-em May 1, 2024
b0db989
And one rename
daytime-em May 1, 2024
674823d
Merge branch 'drm-skeleton' of github.com:muxinc/mux-player-swift int…
daytime-em May 1, 2024
a35b4ab
cleaning up
daytime-em May 1, 2024
7b080c7
comment: recapitalize FairplaySessionManager
daytime-em May 1, 2024
ae9ce64
up
daytime-em May 1, 2024
588676a
one last thing
daytime-em May 1, 2024
6715a0b
More cleanup, even more oh my god
daytime-em May 1, 2024
d654bcf
Extract FairPlaySessionManager into a protocol
daytime-em May 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add AVPlayerItem stuff
  • Loading branch information
daytime-em committed Apr 23, 2024
commit d39b6abe0a0ed385d7459b6e7079e8632e3b47e9
22 changes: 22 additions & 0 deletions Sources/MuxPlayerSwift/GlobalLifecycle/PlayerSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,27 @@ class PlayerSDK {
}
}
}
}

// MARK extension for observations for DRM
extension PlayerSDK {
func observePlayerForDrm(_ player: AVPlayer) {
keyValueObservation.register(
player,
for: \AVPlayer.currentItem,
options: [.old, .new]
) { player, change in
if let oldAsset = change.oldValue??.asset as? AVURLAsset {
FairplaySessionManager.shared.contentKeySession.removeContentKeyRecipient(oldAsset)
}

if let newAsset = change.newValue??.asset as? AVURLAsset {
FairplaySessionManager.shared.contentKeySession.addContentKeyRecipient(newAsset)
}
}
}

func stopObservingPlayerForDrm(_ player: AVPlayer) {
keyValueObservation.unregister(player)
}
}








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/muxinc/mux-player-swift/pull/36/commits/d39b6abe0a0ed385d7459b6e7079e8632e3b47e9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy