示例#1
0
        /// <summary>
        /// Gets information whether the current content of the player is spherical.
        /// </summary>
        /// <returns>True if the current content is spherical; otherwise false.</returns>
        /// <remarks>
        /// The <see cref="Player"/> that owns this instance must be in the <see cref="PlayerState.Ready"/>,
        /// <see cref="PlayerState.Playing"/>, or <see cref="PlayerState.Paused"/> state.
        /// </remarks>
        /// <feature>http://tizen.org/feature/opengles.version.2_0</feature>
        /// <feature>http://tizen.org/feature/multimedia.player.spherical_video</feature>
        /// <exception cref="NotSupportedException">The required feature is not supported.</exception>
        /// <exception cref="ObjectDisposedException">The <see cref="Player"/> that this instance belongs to has been disposed of.</exception>
        /// <exception cref="InvalidOperationException">The <see cref="Player"/> that this instance belongs to is not in the valid state.</exception>
        /// <since_tizen> 5 </since_tizen>
        public bool IsSphericalContent()
        {
            ValidationUtil.ValidateFeatureSupported(PlayerFeatures.OpenGl);
            ValidationUtil.ValidateFeatureSupported(PlayerFeatures.SphericalVideo);

            Player.ValidatePlayerState(PlayerState.Ready, PlayerState.Playing, PlayerState.Paused);

            NativePlayer.IsSphericalContent(Player.Handle, out var value).
            ThrowIfFailed(Player, "Failed to get the spherical state of the content");

            return(value);
        }