mirror of
https://github.com/samsonjs/media.git
synced 2026-04-20 13:45:47 +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.
|
||||
* Replace the `extensions` variant with `decoderExtensions` and make the
|
||||
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.
|
||||
|
||||
### 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",
|
||||
"samples": [
|
||||
|
|
|
|||
|
|
@ -42,13 +42,10 @@ public class IntentUtil {
|
|||
|
||||
/** Whether the stream is a live stream. */
|
||||
public final boolean isLive;
|
||||
/** The spherical stereo mode or null. */
|
||||
@Nullable public final String sphericalStereoMode;
|
||||
|
||||
/** Creates an instance. */
|
||||
public Tag(boolean isLive, @Nullable String sphericalStereoMode) {
|
||||
public Tag(boolean isLive) {
|
||||
this.isLive = isLive;
|
||||
this.sphericalStereoMode = sphericalStereoMode;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -60,11 +57,6 @@ public class IntentUtil {
|
|||
|
||||
// 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.
|
||||
|
||||
public static final String URI_EXTRA = "uri";
|
||||
|
|
@ -237,19 +229,16 @@ public class IntentUtil {
|
|||
private static void addPlaybackPropertiesToIntent(
|
||||
MediaItem.PlaybackProperties playbackProperties, Intent intent, String extrasKeySuffix) {
|
||||
boolean isLive = false;
|
||||
String sphericalStereoMode = null;
|
||||
if (playbackProperties.tag instanceof Tag) {
|
||||
Tag tag = (Tag) playbackProperties.tag;
|
||||
isLive = tag.isLive;
|
||||
sphericalStereoMode = tag.sphericalStereoMode;
|
||||
}
|
||||
intent
|
||||
.putExtra(MIME_TYPE_EXTRA + extrasKeySuffix, playbackProperties.mimeType)
|
||||
.putExtra(
|
||||
AD_TAG_URI_EXTRA + extrasKeySuffix,
|
||||
playbackProperties.adTagUri != null ? playbackProperties.adTagUri.toString() : null)
|
||||
.putExtra(IS_LIVE_EXTRA + extrasKeySuffix, isLive)
|
||||
.putExtra(SPHERICAL_STEREO_MODE_EXTRA, sphericalStereoMode);
|
||||
.putExtra(IS_LIVE_EXTRA + extrasKeySuffix, isLive);
|
||||
if (playbackProperties.drmConfiguration != null) {
|
||||
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.StyledPlayerControlView;
|
||||
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.util.Assertions;
|
||||
import com.google.android.exoplayer2.util.ErrorMessageProvider;
|
||||
|
|
@ -108,10 +107,6 @@ public class PlayerActivity extends AppCompatActivity
|
|||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
Intent intent = getIntent();
|
||||
String sphericalStereoMode = intent.getStringExtra(IntentUtil.SPHERICAL_STEREO_MODE_EXTRA);
|
||||
if (sphericalStereoMode != null) {
|
||||
setTheme(R.style.PlayerTheme_Spherical);
|
||||
}
|
||||
super.onCreate(savedInstanceState);
|
||||
dataSourceFactory = buildDataSourceFactory();
|
||||
if (CookieHandler.getDefault() != DEFAULT_COOKIE_MANAGER) {
|
||||
|
|
@ -128,21 +123,6 @@ public class PlayerActivity extends AppCompatActivity
|
|||
playerView.setControllerVisibilityListener(this);
|
||||
playerView.setErrorMessageProvider(new PlayerErrorMessageProvider());
|
||||
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) {
|
||||
trackSelectorParameters = savedInstanceState.getParcelable(KEY_TRACK_SELECTOR_PARAMETERS);
|
||||
|
|
|
|||
|
|
@ -350,7 +350,6 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||
String extension = null;
|
||||
String title = null;
|
||||
boolean isLive = false;
|
||||
String sphericalStereoMode = null;
|
||||
ArrayList<PlaylistHolder> children = null;
|
||||
Uri subtitleUri = null;
|
||||
String subtitleMimeType = null;
|
||||
|
|
@ -415,11 +414,6 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||
case "ad_tag_uri":
|
||||
mediaItem.setAdTagUri(reader.nextString());
|
||||
break;
|
||||
case "spherical_stereo_mode":
|
||||
Assertions.checkState(
|
||||
!insidePlaylist, "Invalid attribute on nested item: spherical_stereo_mode");
|
||||
sphericalStereoMode = reader.nextString();
|
||||
break;
|
||||
case "subtitle_uri":
|
||||
subtitleUri = Uri.parse(reader.nextString());
|
||||
break;
|
||||
|
|
@ -446,7 +440,7 @@ public class SampleChooserActivity extends AppCompatActivity
|
|||
.setUri(uri)
|
||||
.setMediaMetadata(new MediaMetadata.Builder().setTitle(title).build())
|
||||
.setMimeType(IntentUtil.inferAdaptiveStreamMimeType(uri, extension))
|
||||
.setTag(new IntentUtil.Tag(isLive, sphericalStereoMode));
|
||||
.setTag(new IntentUtil.Tag(isLive));
|
||||
if (subtitleUri != null) {
|
||||
MediaItem.Subtitle subtitle =
|
||||
new MediaItem.Subtitle(
|
||||
|
|
|
|||
|
|
@ -23,8 +23,4 @@
|
|||
<item name="android:windowBackground">@android:color/black</item>
|
||||
</style>
|
||||
|
||||
<style name="PlayerTheme.Spherical">
|
||||
<item name="surface_type">spherical_gl_surface_view</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in a new issue