Skip to content

Commit

Permalink
fix(android): remove Ti.Media.VideoPlayer.contentURL property
Browse files Browse the repository at this point in the history
  • Loading branch information
sgtcoolguy committed Nov 2, 2020
1 parent de780ec commit 5bf7826
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ public void processProperties(KrollDict d)
getPlayerProxy().fireLoadState(MediaModule.VIDEO_LOAD_STATE_UNKNOWN);

String url = d.getString(TiC.PROPERTY_URL);
if (url == null) {
url = d.getString(TiC.PROPERTY_CONTENT_URL);
if (url != null) {
Log.w(TAG, "contentURL is deprecated, use url instead");
proxy.setProperty(TiC.PROPERTY_URL, url);
}
}
if (url != null) {
videoView.setVideoURI(Uri.parse(proxy.resolveUrl(null, url)));
seekIfNeeded();
Expand All @@ -151,19 +144,14 @@ public void propertyChanged(String key, Object oldValue, Object newValue, KrollP
return;
}

if (key.equals(TiC.PROPERTY_URL) || key.equals(TiC.PROPERTY_CONTENT_URL)) {
if (key.equals(TiC.PROPERTY_URL)) {
if (newValue != null) {
getPlayerProxy().fireLoadState(MediaModule.VIDEO_LOAD_STATE_UNKNOWN);
videoView.setVideoURI(Uri.parse(proxy.resolveUrl(null, TiConvert.toString(newValue))));
seekIfNeeded();
} else {
videoView.stopPlayback();
}
if (key.equals(TiC.PROPERTY_CONTENT_URL)) {
Log.w(TAG, "contentURL is deprecated, use url instead");
proxy.setProperty(TiC.PROPERTY_URL, newValue);
}

} else if (key.equals(TiC.PROPERTY_SCALING_MODE)) {
videoView.setScalingMode(TiConvert.toInt(newValue));
} else if (key.equals(TiC.PROPERTY_VOLUME)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
TiC.PROPERTY_URL,
TiC.PROPERTY_INITIAL_PLAYBACK_TIME,
TiC.PROPERTY_DURATION,
TiC.PROPERTY_CONTENT_URL,
TiC.PROPERTY_AUTOPLAY,
TiC.PROPERTY_END_PLAYBACK_TIME,
TiC.PROPERTY_PLAYABLE_DURATION,
Expand Down
5 changes: 0 additions & 5 deletions android/titanium/src/java/org/appcelerator/titanium/TiC.java
Original file line number Diff line number Diff line change
Expand Up @@ -1437,11 +1437,6 @@ public class TiC
*/
public static final String PROPERTY_CONTENT_TITLE = "contentTitle";

/**
* @module.api
*/
public static final String PROPERTY_CONTENT_URL = "contentURL";

/**
* @module.api
*/
Expand Down

0 comments on commit 5bf7826

Please sign in to comment.