#!/bin/bash if command -v jq &> /dev/null && command -v gst-launch-1.0 &> /dev/null; then function rai-play() { [ "x$1" = "x" ] && return 1; local BANDWIDTH="2479000" local CONTENT_URL CONTENT_URL=$(wget -q "${1}?json" -O - | jq -r '.video .contentUrl') if [ "x$CONTENT_URL" != "x" ]; then gst-launch-1.0 playbin connection-speed="$BANDWIDTH" uri="$CONTENT_URL" fi } fi