-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFAVPlayer.podspec
51 lines (34 loc) · 2.38 KB
/
FAVPlayer.podspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Pod::Spec.new do |s|
s.name = "FAVPlayer"
s.version = "3.1.1.1"
s.summary = "The FAVPlayer or Frequency AVPlayer is a iOS and tvOS native player which let you easily play Frequency's videos."
s.description = <<-DESC
The FAVPlayer or Frequency AVPlayer is a iOS and tvOS native player which let you easily play Frequency's videos.
The FAVPlayer encapsulate all the logic required to play a video with advertisement, reporting and beaconing. This project leverage the Javascript Core framework to allow the existing Javascript code of the Javascript Player SDK to be interfaced with Swift and objc. The native part, written in Swift 4, is only responsible for playback and sending/handling events. The Javascript part handles requests to the Frequency API, request to the ad decisioning server, parse the VAST responses, tracks the activity of the player, and sends beacons to the appropriate ad servers.
To play a video
First you'll have to authenticate, then create the player and pass it the token and deviceId.
var f = FAVPlayer.init(apiUrl: "https://prd-freq.frequency.com", token: "TOKEN_ID", deviceId: "DEVICE_ID")
Create an avPlayerViewController and assign the newly created favPlayer as its player.
var avPlayerViewController = AVPlayerViewController.init()
avPlayerViewController.player = favPlayer
Load a videoId provided by a Frequency service
favPlayer.load(videoId: "VIDEO_ID")
Present the AVPlayerViewController.
self.present(avPlayerViewController, animated: true, completion: nil)
DESC
s.homepage = "https://confluence.frequency.com/display/HOME/iOS+SDK+3.1.0"
s.license = { :type => "Apache License, Version 2.0", :file => "LICENSE.txt" }
s.author = { "clementperez" => "[email protected]" }
s.ios.deployment_target = '10.0'
s.tvos.deployment_target = '10.0'
s.source = { :git => "https://github.com/frequency/frequency-ios-sdk-public.git", :tag => "#{s.version}" }
s.source_files = "Sources", "Sources/**/*.{h,m,swift}"
s.exclude_files = "Demo" , "Sources/Ejecta/*.{h,m}", "Sources/Ejecta/**/*.{h,m}"
s.requires_arc = true
s.subspec 'noarc' do |sp|
sp.source_files = "Sources/Ejecta/*.{h,m}", "Sources/Ejecta/**/*.{h,m}"
sp.requires_arc = false
end
s.resources = "Assets/*.js"
s.documentation_url = "https://confluence.frequency.com/display/HOME/iOS+SDK+3.1.0"
end