Example #1
0
        /// <summary>
        /// Sets the maximum limit of the streaming variant.
        /// </summary>
        /// <exception cref="ObjectDisposedException">The <see cref="Player"/> has already been disposed of.</exception>
        /// <exception cref="ArgumentOutOfRangeException">
        ///     <pramref name="bandwidth"/> is less than -1.<br/>
        ///     -or-<br/>
        ///     <pramref name="width"/> is less than -1.<br/>
        ///     -or-<br/>
        ///     <pramref name="height"/> is less than -1.<br/>
        /// </exception>
        /// <seealso cref="GetMaxLimit()"/>
        /// <since_tizen> 5 </since_tizen>
        public void SetMaxLimit(int bandwidth, int width = -1, int height = -1)
        {
            Player.ValidateNotDisposed();

            if (bandwidth < -1 || width < -1 || height < -1)
            {
                throw new ArgumentOutOfRangeException("invalid range");
            }

            NativePlayer.SetMaxLimit(Player.Handle, bandwidth, width, height).
            ThrowIfFailed(Player, "Failed to set the max limit to the player");
        }