mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Removes spherical stereo play back mode
- Removed corresponding playback examples in the resouce JSON files. - Removed the spherical style declaration. - Removed spherical stereo mode related Intent settings, and - Removed code to play back media in spherical stereo mode BUG=160460714 (grafted from 595fe17a480d5bc64d0198130150d8e8a5daa679) PiperOrigin-RevId: 322206314
This commit is contained in:
parent
08f62efb88
commit
73df8e4a26
6 changed files with 6 additions and 64 deletions
|
|
@ -254,6 +254,9 @@
|
||||||
* Retain previous position in list of samples.
|
* Retain previous position in list of samples.
|
||||||
* Replace the `extensions` variant with `decoderExtensions` and make the
|
* Replace the `extensions` variant with `decoderExtensions` and make the
|
||||||
demo app use the Cronet and IMA extensions by default.
|
demo app use the Cronet and IMA extensions by default.
|
||||||
|
* Removed support for media tunneling
|
||||||
|
* Removed support for random ABR (random track selection)
|
||||||
|
* Removed support for playing back in spherical stereo mode
|
||||||
* Add Guava dependency.
|
* Add Guava dependency.
|
||||||
|
|
||||||
### 2.11.7 (2020-06-29) ###
|
### 2.11.7 (2020-06-29) ###
|
||||||
|
|
|
||||||
|
|
@ -495,26 +495,6 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "360",
|
|
||||||
"samples": [
|
|
||||||
{
|
|
||||||
"name": "Congo (360 top-bottom stereo)",
|
|
||||||
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/360/congo.mp4",
|
|
||||||
"spherical_stereo_mode": "top_bottom"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Sphericalv2 (180 top-bottom stereo)",
|
|
||||||
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/360/sphericalv2.mp4",
|
|
||||||
"spherical_stereo_mode": "top_bottom"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Iceland (360 top-bottom stereo ts)",
|
|
||||||
"uri": "https://storage.googleapis.com/exoplayer-test-media-1/360/iceland0.ts",
|
|
||||||
"spherical_stereo_mode": "top_bottom"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Subtitles",
|
"name": "Subtitles",
|
||||||
"samples": [
|
"samples": [
|
||||||
|
|
|
||||||
|
|
@ -42,13 +42,10 @@ public class IntentUtil {
|
||||||
|
|
||||||
/** Whether the stream is a live stream. */
|
/** Whether the stream is a live stream. */
|
||||||
public final boolean isLive;
|
public final boolean isLive;
|
||||||
/** The spherical stereo mode or null. */
|
|
||||||
@Nullable public final String sphericalStereoMode;
|
|
||||||
|
|
||||||
/** Creates an instance. */
|
/** Creates an instance. */
|
||||||
public Tag(boolean isLive, @Nullable String sphericalStereoMode) {
|
public Tag(boolean isLive) {
|
||||||
this.isLive = isLive;
|
this.isLive = isLive;
|
||||||
this.sphericalStereoMode = sphericalStereoMode;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -60,11 +57,6 @@ public class IntentUtil {
|
||||||
|
|
||||||
// Activity extras.
|
// Activity extras.
|
||||||
|
|
||||||
public static final String SPHERICAL_STEREO_MODE_EXTRA = "spherical_stereo_mode";
|
|
||||||
public static final String SPHERICAL_STEREO_MODE_MONO = "mono";
|
|
||||||
public static final String SPHERICAL_STEREO_MODE_TOP_BOTTOM = "top_bottom";
|
|
||||||
public static final String SPHERICAL_STEREO_MODE_LEFT_RIGHT = "left_right";
|
|
||||||
|
|
||||||
// Media item configuration extras.
|
// Media item configuration extras.
|
||||||
|
|
||||||
public static final String URI_EXTRA = "uri";
|
public static final String URI_EXTRA = "uri";
|
||||||
|
|
@ -237,19 +229,16 @@ public class IntentUtil {
|
||||||
private static void addPlaybackPropertiesToIntent(
|
private static void addPlaybackPropertiesToIntent(
|
||||||
MediaItem.PlaybackProperties playbackProperties, Intent intent, String extrasKeySuffix) {
|
MediaItem.PlaybackProperties playbackProperties, Intent intent, String extrasKeySuffix) {
|
||||||
boolean isLive = false;
|
boolean isLive = false;
|
||||||
String sphericalStereoMode = null;
|
|
||||||
if (playbackProperties.tag instanceof Tag) {
|
if (playbackProperties.tag instanceof Tag) {
|
||||||
Tag tag = (Tag) playbackProperties.tag;
|
Tag tag = (Tag) playbackProperties.tag;
|
||||||
isLive = tag.isLive;
|
isLive = tag.isLive;
|
||||||
sphericalStereoMode = tag.sphericalStereoMode;
|
|
||||||
}
|
}
|
||||||
intent
|
intent
|
||||||
.putExtra(MIME_TYPE_EXTRA + extrasKeySuffix, playbackProperties.mimeType)
|
.putExtra(MIME_TYPE_EXTRA + extrasKeySuffix, playbackProperties.mimeType)
|
||||||
.putExtra(
|
.putExtra(
|
||||||
AD_TAG_URI_EXTRA + extrasKeySuffix,
|
AD_TAG_URI_EXTRA + extrasKeySuffix,
|
||||||
playbackProperties.adTagUri != null ? playbackProperties.adTagUri.toString() : null)
|
playbackProperties.adTagUri != null ? playbackProperties.adTagUri.toString() : null)
|
||||||
.putExtra(IS_LIVE_EXTRA + extrasKeySuffix, isLive)
|
.putExtra(IS_LIVE_EXTRA + extrasKeySuffix, isLive);
|
||||||
.putExtra(SPHERICAL_STEREO_MODE_EXTRA, sphericalStereoMode);
|
|
||||||
if (playbackProperties.drmConfiguration != null) {
|
if (playbackProperties.drmConfiguration != null) {
|
||||||
addDrmConfigurationToIntent(playbackProperties.drmConfiguration, intent, extrasKeySuffix);
|
addDrmConfigurationToIntent(playbackProperties.drmConfiguration, intent, extrasKeySuffix);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ import com.google.android.exoplayer2.trackselection.TrackSelectionArray;
|
||||||
import com.google.android.exoplayer2.ui.DebugTextViewHelper;
|
import com.google.android.exoplayer2.ui.DebugTextViewHelper;
|
||||||
import com.google.android.exoplayer2.ui.StyledPlayerControlView;
|
import com.google.android.exoplayer2.ui.StyledPlayerControlView;
|
||||||
import com.google.android.exoplayer2.ui.StyledPlayerView;
|
import com.google.android.exoplayer2.ui.StyledPlayerView;
|
||||||
import com.google.android.exoplayer2.ui.spherical.SphericalGLSurfaceView;
|
|
||||||
import com.google.android.exoplayer2.upstream.DataSource;
|
import com.google.android.exoplayer2.upstream.DataSource;
|
||||||
import com.google.android.exoplayer2.util.Assertions;
|
import com.google.android.exoplayer2.util.Assertions;
|
||||||
import com.google.android.exoplayer2.util.ErrorMessageProvider;
|
import com.google.android.exoplayer2.util.ErrorMessageProvider;
|
||||||
|
|
@ -108,10 +107,6 @@ public class PlayerActivity extends AppCompatActivity
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
String sphericalStereoMode = intent.getStringExtra(IntentUtil.SPHERICAL_STEREO_MODE_EXTRA);
|
|
||||||
if (sphericalStereoMode != null) {
|
|
||||||
setTheme(R.style.PlayerTheme_Spherical);
|
|
||||||
}
|
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
dataSourceFactory = buildDataSourceFactory();
|
dataSourceFactory = buildDataSourceFactory();
|
||||||
if (CookieHandler.getDefault() != DEFAULT_COOKIE_MANAGER) {
|
if (CookieHandler.getDefault() != DEFAULT_COOKIE_MANAGER) {
|
||||||
|
|
@ -128,21 +123,6 @@ public class PlayerActivity extends AppCompatActivity
|
||||||
playerView.setControllerVisibilityListener(this);
|
playerView.setControllerVisibilityListener(this);
|
||||||
playerView.setErrorMessageProvider(new PlayerErrorMessageProvider());
|
playerView.setErrorMessageProvider(new PlayerErrorMessageProvider());
|
||||||
playerView.requestFocus();
|
playerView.requestFocus();
|
||||||
if (sphericalStereoMode != null) {
|
|
||||||
int stereoMode;
|
|
||||||
if (IntentUtil.SPHERICAL_STEREO_MODE_MONO.equals(sphericalStereoMode)) {
|
|
||||||
stereoMode = C.STEREO_MODE_MONO;
|
|
||||||
} else if (IntentUtil.SPHERICAL_STEREO_MODE_TOP_BOTTOM.equals(sphericalStereoMode)) {
|
|
||||||
stereoMode = C.STEREO_MODE_TOP_BOTTOM;
|
|
||||||
} else if (IntentUtil.SPHERICAL_STEREO_MODE_LEFT_RIGHT.equals(sphericalStereoMode)) {
|
|
||||||
stereoMode = C.STEREO_MODE_LEFT_RIGHT;
|
|
||||||
} else {
|
|
||||||
showToast(R.string.error_unrecognized_stereo_mode);
|
|
||||||
finish();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
((SphericalGLSurfaceView) playerView.getVideoSurfaceView()).setDefaultStereoMode(stereoMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
trackSelectorParameters = savedInstanceState.getParcelable(KEY_TRACK_SELECTOR_PARAMETERS);
|
trackSelectorParameters = savedInstanceState.getParcelable(KEY_TRACK_SELECTOR_PARAMETERS);
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,6 @@ public class SampleChooserActivity extends AppCompatActivity
|
||||||
String extension = null;
|
String extension = null;
|
||||||
String title = null;
|
String title = null;
|
||||||
boolean isLive = false;
|
boolean isLive = false;
|
||||||
String sphericalStereoMode = null;
|
|
||||||
ArrayList<PlaylistHolder> children = null;
|
ArrayList<PlaylistHolder> children = null;
|
||||||
Uri subtitleUri = null;
|
Uri subtitleUri = null;
|
||||||
String subtitleMimeType = null;
|
String subtitleMimeType = null;
|
||||||
|
|
@ -415,11 +414,6 @@ public class SampleChooserActivity extends AppCompatActivity
|
||||||
case "ad_tag_uri":
|
case "ad_tag_uri":
|
||||||
mediaItem.setAdTagUri(reader.nextString());
|
mediaItem.setAdTagUri(reader.nextString());
|
||||||
break;
|
break;
|
||||||
case "spherical_stereo_mode":
|
|
||||||
Assertions.checkState(
|
|
||||||
!insidePlaylist, "Invalid attribute on nested item: spherical_stereo_mode");
|
|
||||||
sphericalStereoMode = reader.nextString();
|
|
||||||
break;
|
|
||||||
case "subtitle_uri":
|
case "subtitle_uri":
|
||||||
subtitleUri = Uri.parse(reader.nextString());
|
subtitleUri = Uri.parse(reader.nextString());
|
||||||
break;
|
break;
|
||||||
|
|
@ -446,7 +440,7 @@ public class SampleChooserActivity extends AppCompatActivity
|
||||||
.setUri(uri)
|
.setUri(uri)
|
||||||
.setMediaMetadata(new MediaMetadata.Builder().setTitle(title).build())
|
.setMediaMetadata(new MediaMetadata.Builder().setTitle(title).build())
|
||||||
.setMimeType(IntentUtil.inferAdaptiveStreamMimeType(uri, extension))
|
.setMimeType(IntentUtil.inferAdaptiveStreamMimeType(uri, extension))
|
||||||
.setTag(new IntentUtil.Tag(isLive, sphericalStereoMode));
|
.setTag(new IntentUtil.Tag(isLive));
|
||||||
if (subtitleUri != null) {
|
if (subtitleUri != null) {
|
||||||
MediaItem.Subtitle subtitle =
|
MediaItem.Subtitle subtitle =
|
||||||
new MediaItem.Subtitle(
|
new MediaItem.Subtitle(
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,4 @@
|
||||||
<item name="android:windowBackground">@android:color/black</item>
|
<item name="android:windowBackground">@android:color/black</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="PlayerTheme.Spherical">
|
|
||||||
<item name="surface_type">spherical_gl_surface_view</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue