
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
video.api:android-player-analytics-exoplayer
Advanced tools
Android ExoPlayer analytics library for api.video service.
api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
Android library to manually call the api.video analytics collector.
This is useful if you are using a video player for which we do not yet provide a ready-to-use monitoring module.
In your module build.gradle
, add the following code in dependencies
:
dependencies {
implementation 'video.api:android-player-analytics:2.0.2'
}
In your AndroidManifest.xml
, add the following code in <manifest>
:
<uses-permission android:name="android.permission.INTERNET" />
A demo application demonstrates how to use player analytics library.
See /example
folder.
The analytics module constructor takes a Options
parameter that contains the following options:
Option name | Mandatory | Type | Description |
---|---|---|---|
mediaUrl | ** | ||
yes** | String | url of the media (eg. https://vod.api.video/vod/vi5oDagRVJBSKHxSiPux5rYD/hls/manifest.m3u8 ) | |
videoInfo | ** | ||
yes** | VideoInfo | information containing analytics collector url, video type (vod or live) and video id | |
metadata | no | Map<String, String> | object containing metadata |
onSessionIdReceived | no | ((sessionId: String) -> Unit)? | callback called once the session id has been received |
onPing | no | ((message: PlaybackPingMessage) -> Unit)? | callback called before sending the ping message |
Options instantiation is made with either mediaUrl or videoInfo.
Once the module is instantiated, the following methods have to be called to monitor the playback events.
If you know the event timestamp, you can use it as the eventTime
parameter. If you don't know the
event timestamp, you can set the currentTime
parameter with a scheduler.
play(eventTime: Float = currentTime): Future<void>
method to call when the video starts playing for the first time (in the case of a resume after paused, use
resume()
)
resume(eventTime: Float = currentTime): Future<void>
method to call when the video playback is resumed after a pause
ready(eventTime: Float = currentTime): Future<void>
method to call once the player is ready to play the media
end(eventTime: Float = currentTime): Future<void>
method to call when the video is ended
seek(from: Float, to: Float): Future<void>
method to call when a seek event occurs, the
from
andto
parameters are mandatory and should contains the seek start & end times in seconds
pause(eventTime: Float = currentTime): Future<void>
method to call when the video is paused
destroy(eventTime: Float = currentTime): Future<void>
method to call when the video player is disposed (eg. when the use closes the navigation tab)
currentTime
field to call each time the playback time changes (it should be called often, the accuracy of the collected data depends on it) if you don't know event time.
A complete API documentation is available.
FAQs
Android ExoPlayer analytics library for api.video service.
We found that video.api:android-player-analytics-exoplayer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.