MediaMelon iOS Custom Multi-Player SDK Integration Document
This guide is for integrating the MediaMelon Custom Multi-Player SDK for the iOS, tvOS & visionOS - based Players
Step 1: Add MediaMelon SDK
Step 2: Instantiate and Register SDK
Step 3: Initialize Playback Session
Step 4: Additional Custom Metadata
Step 5: Network and Stream Information
Step 6: Chunk/Segment Information
Step 7: Player Events
Step 8: Fallback & Request Status
Step 9: Ad Data & Ad Events
Step 10: Custom Events
Step 1: Add MediaMelon SDK
SPM:
.package(
url: "https://github.com/MediamelonSDK/mm-ios-qoe-sdk",
.upToNextMajor(from: "3.3.1")
),Step 2: Instantiate and Register SDK
Step 2.1: SDK Instance Creation:
Step 2.2: Report Registration Information:
Step 2.3: Report Device Information:
Step 2.4: Report Application Information:
Step 2.5: Report Sub Property ID:
Step 3: Initialize Playback Session
Step 3.1: Initialize Session with Content Metadata:
All metadata fields set from Step 3 will be reset when initializeAssetForPlayer is called. Therefore, ensure that all session-specific metadata, such as view session ID, preload, and similar fields, are reported after initializeAssetForPlayer is called for every playback session.
Step 3.2: Report View Session ID:
Step 3.3: Report Experiment Name:
Step 3.4: Report Preload:
Step 3.5: Report Player Resolution:
Step 3.6: Report User-Initiated Playback:
Step 4: Additional Custom Metadata
Check the custom tags configuration in your dashboard and report accordingly. If the custom tags are not configured, please configure and use them accordingly.
Step 5: Network and Stream Information
Step 5.1: Report Network Information:
Step 5.2: Report CDN Information:
Step 5.3: Report Stream Information:
Step 5.4: Report Encoding Service:
Step 5.5: Report Video Presentation Information:
Step 5.6: Report Track Information:
Call this API with initial values, and every time there is a change in the track info. Call this API when the user enables or disables subtitles or changes the audio track.
Step 5.7: Report Rendition:
At the start of the video, create a ReditionInfo object, assign initial rendition values to the object, and report it to the SDK. For any subsequent rendition change, update only the fields that changed in the same RenditionInfo object. Leave the unchanged fields as-is, and report the updated object to the SDK.
Step 5.8: Update DRM:
updateDrmType(drmType:) is deprecated. A new API called updateDRM(drmProtection:, drmLevel:) is introduced.
Step 6: Chunk/Segment Information
Step 6.1: Report Download Rate:
Report the latest chunk download rate using this method. Trigger this method for every chunk.
Step 7: Player Events
Step 7.1: Report Player State:
Step 7.2: Report Buffering:
Step 7.3: Report Seek:
Step 7.4: Report Error:
Step 7.5: Report Warning:
Step 7.6: Report Playback Position:
Call this every 0.5 sec or 1 sec to report the playback position from the player
Step 8: Fallback & Request Status
Step 8.1: Report Fallback Event:
Step 8.2: Report Request Status:
Report FAILED or CANCELLED requests for the following request types:
PIR
MANIFEST
AUDIO_CHUNK
VIDEO_CHUNK
DRM
SUBTITLE
Step 9: Ad Data & Ad Events
Step 9.1: Report Ad Break Start & End:
Step 9.2: Report Ad Data, Ad Start & End:
Step 9.3: Report Ad Buffering:
Use Ad Buffering APIs to report any buffering that occurs during ad playback. For any buffering event, either content buffering or ad buffering should be reported, but not both.
Step 9.4: Report Ad Events:
Use the reportAdEvent function to report all Ad events.
Step 9.5: Report Ad Request and Response:
Report Ad Request and Ad Response using the following API:
Step 9.6: Report Ad Errors and Warnings:
Ad Errors:
Ad Warnings:
Step 10: Custom Events
The Custom Events API can be used to report events that are not covered by the default MediaMelon-supported events. Custom events must be reported within the SDK activity lifecycle. Events reported before SDK initialization or after session end will be ignored. Please refer to the guidelines and constraints below.
Release Notes
Last updated