Skip to main content

FCAST_Client Wrapper Documentation

This is a Python client wrapper for the video streaming receiver found at fcast on GitLab. The FCAST_Client class provides an easy-to-use interface to communicate with the reciever and control video playback.

Installation

Ensure you have Python installed and the required libraries. This wrapper uses the socket, json, and struct libraries which are part of the Python standard library.

Usage

First, create an instance of the FCAST_Client:

client = FCAST_Client(host="your_host_here", port=46899)

Methods

play

Plays a video.

client.play(container="video/mp4", url="http://example.com/video.mp4")

Parameters:

  • container: The MIME type (e.g., "video/mp4").
  • url: The URL to load (optional).
  • content: The content to load (e.g., a DASH manifest, optional).
  • time: The time to start playing in seconds (optional).

pause

Pauses the video.

client.pause()

resume

Resumes the video.

client.resume()

stop

Stops the video.

client.stop()

seek

Seeks to a specific time in the video.

client.seek(time=120)  # Seeks to 2 minutes into the video.

Parameters:

  • time: The time to seek to in seconds.

set_volume

Sets the volume of the video.

client.set_volume(volume=0.5)  # Sets the volume to 50%.

Parameters:

  • volume: The volume level (0.0 - 1.0).

close

Closes the connection to the reciever.

client.close()

Example of Usage with fcast

To use the FCAST_Client wrapper with the fcast reciever, follow the steps below:

  1. Ensure the fcast reciever is running and listening on the desired host and port.

  2. Create an instance of the FCAST_Client and connect to the fcast reciever:

from fcast import FCAST_Client

# Replace with the appropriate host and port of your fcast reciever
client = FCAST_Client(host="your_host_here", port=46899)
  1. Play a video:
# Play a video from a URL
client.play(container="video/mp4", url="http://example.com/video.mp4")
  1. Control the video playback:
import time

# Pause the video after 5 seconds
time.sleep(5)
client.pause()

# Resume playback after another 5 seconds
time.sleep(5)
client.resume()

# Seek to 2 minutes into the video after 5 seconds
time.sleep(5)
client.seek(time=120)

# Adjust the volume to 50%
client.set_volume(volume=0.5)
  1. Once done, close the connection:
client.close()

Metadata

Release files for fcast-client 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fcast-client 0.3
File Size Uploaded Provenance
fcast_client-0.3.tar.gz 2.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fcast-client 0.3
File Interpreter ABI Platform
fcast_client-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 kB

Release files / fcast_client-0.3.tar.gz

Download URL fcast_client-0.3.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5bd815598c775553f0780c465f0f0adafdb4ecc07ad7f3b3f030d9c24aac007d
BLAKE2b-256 checksum
How to use checksums
20dc4699d25f79367c10b6635a70381366c503f529d150f6797acbc6d68950a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Release files / fcast_client-0.3-py3-none-any.whl

Download URL fcast_client-0.3-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f0ebd90a142d3e3fe26ba51a4797650644837207d77b9f1d79f3eb59e436add
BLAKE2b-256 checksum
How to use checksums
d6266bad0c15118f55d55ef7e293a740e760168f5634841683104c8392b2c23d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.10

Security for fcast-client 0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page