Skip to main content
Glama
qiniu

Qiniu MCP Server

Official
by qiniu

live_streaming_get_play_urls

Retrieve FLV, M3U8, and WHEP playback URLs to access live streams from Qiniu Cloud's live streaming service.

Instructions

Get playback URLs for a stream. Returns FLV, M3U8, and WHEP playback URLs that can be used to play live streams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
play_domainYesThe playback domain name
bucketYesLiveStreaming bucket name
stream_nameYesThe stream name

Implementation Reference

  • The async handler function for the MCP tool 'live_streaming_get_play_urls' that delegates to LiveStreamingService.get_play_urls and returns the result as TextContent.
    async def get_play_urls(self, **kwargs) -> list[types.TextContent]: result = self.live_streaming.get_play_urls(**kwargs) return [types.TextContent(type="text", text=str(result))]
  • The tool metadata decorator defining the schema, name, description, and input validation for 'live_streaming_get_play_urls'.
    @tools.tool_meta( types.Tool( name="live_streaming_get_play_urls", description="Get playback URLs for a stream. Returns FLV, M3U8, and WHEP playback URLs that can be used to play live streams.", inputSchema={ "type": "object", "properties": { "play_domain": { "type": "string", "description": "The playback domain name", }, "bucket": { "type": "string", "description": _BUCKET_DESC, }, "stream_name": { "type": "string", "description": "The stream name", }, }, "required": ["play_domain", "bucket", "stream_name"], }, ) )
  • The registration function that creates a tool implementation instance and auto-registers all LiveStreaming tools, including 'live_streaming_get_play_urls'.
    def register_tools(live_streaming: LiveStreamingService): tool_impl = _ToolImpl(live_streaming) tools.auto_register_tools( [ tool_impl.create_bucket, tool_impl.create_stream, tool_impl.bind_push_domain, tool_impl.bind_play_domain, tool_impl.get_push_urls, tool_impl.get_play_urls, tool_impl.query_live_traffic_stats, tool_impl.list_buckets, tool_impl.list_streams, ] )
  • The core implementation in LiveStreamingService that generates the FLV, M3U8, and WHEP playback URLs using string formatting.
    def get_play_urls(self, play_domain: str, bucket: str, stream_name: str) -> Dict[str, Any]: """ Generate playback URLs for FLV, M3U8, and WHEP protocols Args: play_domain: The playback domain bucket: The bucket name stream_name: The stream name Returns: Dict containing FLV, M3U8, and WHEP playback URLs """ flv_url = f"https://{play_domain}/{bucket}/{stream_name}.flv" m3u8_url = f"https://{play_domain}/{bucket}/{stream_name}.m3u8" whep_url = f"https://{play_domain}/{bucket}/{stream_name}.whep" logger.info(f"Generated playback URLs for stream: {stream_name}") return { "status": "success", "play_domain": play_domain, "bucket": bucket, "stream_name": stream_name, "flv_url": flv_url, "m3u8_url": m3u8_url, "whep_url": whep_url, "message": "Playback URLs generated successfully" }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/qiniu/qiniu-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server