a year ago
iOS: 4.13.0 - Offline Playback BPA and adEvent Delegate Method Signature Revision
Our 4.13.0 iOS release introduces an important delegate method signature revision and the new Offline Playback Best Practice App. In addition, this release replaces a type alias, adds media track access, and includes delegates for event observation.
Key bug fixes address button alignment, Chromecast crashes, and JavaScript Environment inspection.
New Features
- IMPORTANT: The
adEvent
delegate method signature has been revised fromfunc jwplayer(_ player: AnyObject, adEvent event: JWAdEvent)
tofunc jwplayer(_ player: JWPlayer, adEvent event: JWAdEvent)
for better consistency and easier access to theJWPlayer
object. If you use or override this method, please update your code to align with the new signature. - The new Offline Playback Best Practice App demonstrates how to implement offline download, storage, and playback of unprotected content.
- The
JWCaptionStyleBuilder
now has a method,allowScaling
, which controls whether side-loaded captions enlargen as the player's size increases (like on an iPad or in full screen). By default, this is enabled. If set to false, it adheres strictly to the user's device settings. - To observe related content events, use the
JWRelatedEventDelegate
, which can be assigned in theJWPlayer
object. TheJWPlayerViewController
conforms to this protocol by default. - Related content can now be loaded with
play(relatedContent:)
. - To observe chapter events for media with defined chapters, use the
JWChaptersDelegate
, which can be assigned in theJWPlayer
object. TheJWPlayerViewController
conforms to this protocol by default. - The typealias,
JSONObject
, has replaced instances of[String : Any]
. - A
JWPlayerItem
can be encoded to or decoded from aJSONObject
. - Additional properties have been added to
JWPlayerItem
, allowing access to different media tracks within the item:chapterTrack: JWMediaTrack?, thumbnailTrack: JWMediaTrack?
andcaptionTracks: [JWMediaTrack]
. - The kind of media track viewed can be queried through the
JWMediaTrackKind
property.
Bug Fixes
- In the VAST ad interface, the Learn More button has been realigned.
- Crashes no longer occur when replacing a playlist during an active Chromecast session.
- JavaScript Environment inspection has been re-enabled.