apache / apache/cordova-plugin-media

onDestroy and dealloc ambiguity

Open
#194 9 comments 0 reactions 0 assignees View on GitHub
platform: android platform: ios support
Dominant language
JavaScript
Stars
391
Forks
762
PR merge metrics
No merged PRs in 30d

Description

Currently, it is impossible for client code to interpret the state or event in which the underlying native Media object has been destroyed when the OS is terminating the activity / process. This is a short coming of the plugin, because the success callback is called without any indication that the entire activity or process was stopped abruptly. In other worse, the MEDIA_STOPPED state is too _ambiguous_ . I would like to request a solution to resolve this ambiguity.

There is no way for the plugin to indicate to the client code that the underlying OS is terminating the the process. Please provide a way for client code to discern the difference between OS forcefully stopping the media and the media stopping because it has successfully reached the end of playback.

Contributor guide

Open the contributing guide

Research direction

Review how onDestroy, dealloc, MEDIA_STOPPED, and the success callback are exposed to client code. Define and document a way to distinguish OS-forced process termination from media reaching the end of playback, then verify the behavior on the affected native platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, objective-c
Domain
audio-video-rtc, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.