function fetchAudioListPlayer($runtime, $playlist, $filearea = "content", $protocol = "", $width = "400", $height = "350", $sequentialplay = "true", $useplayer, $showplaylist, $usepoodlldata = false) { global $CFG, $USER, $COURSE; $moduleid = optional_param('id', 0, PARAM_INT); // The ID of the current module (eg moodleurl/view.php?id=X ) //determine if we are on a mobile device or not $ismobile = isMobile($CFG->filter_poodll_html5play); //if its a poodll player we want an xml feed //if its jw or fp we want an rss feed //if we are ipads or html playlists + fp, we wont use a data feed, we will use a list of links //so in that case we pass a "" and just spit out the links. switch ($useplayer) { case "pd": $datatype = "poodllaudiolist"; break; case "jw": $datatype = "poodllrsslist"; break; case "fp": if ($showplaylist) { $datatype = ""; } else { $datatype = "poodllrsslist"; } break; } //if we are using poodll data, flag that in the filearea param if ($usepoodlldata) { $filearea = "poodlldata"; } //determine playlist url if necessary, if we are using fp player and a visible list we don't need this $fetchdataurl = ""; if ($datatype != "") { //get the url to the automated medialist maker //$fetchdataurl= $CFG->wwwroot . '/filter/poodll/poodlllogiclib.php?datatype=poodllaudiolist' $fetchdataurl = $CFG->wwwroot . '/filter/poodll/poodlllogiclib.php?datatype=' . $datatype . '&courseid=' . $COURSE->id . '&moduleid=' . $moduleid . '¶mone=' . $playlist . '¶mtwo=' . $protocol . '¶mthree=' . $filearea . '&cachekiller=' . rand(10000, 999999); } //If poodll player is not default, use flowplayer it will handle mobile and flash if ($useplayer != "pd") { $returnString = ""; //if html playlist use links as list if ($showplaylist) { $returnString = fetch_poodllaudiolist($moduleid, $COURSE->id, $playlist, "http", $filearea, "alist"); $returnString .= "<br clear='all'/>"; //get a flowplayer without a datafeed //size is hardcoded to match images pulled from styles.css in pooodll filter $returnString .= fetchFlowPlayerCode($width, 40, "/", "audiolist", $ismobile, "", $sequentialplay); //if rss playlist use url of datafeed and pass to flowplayer } else { //get a flowplayer using the data feed //size is hardcoded to match images pulled from styles.css in pooodll filter $returnString .= fetchFlowPlayerCode($width, 40, "/", "audiolist", $ismobile, $fetchdataurl, $sequentialplay); } return $returnString; //If this is a poodll player playlist } else { //Set our servername . $flvserver = $CFG->poodll_media_server; $params = array(); $params['red5url'] = urlencode($flvserver); $params['playertype'] = $protocol; $params['sequentialplay'] = $sequentialplay; $params['playlist'] = urlencode($fetchdataurl); $returnString = fetchSWFWidgetCode('poodllaudiolistplayer.lzx.swf9.swf', $params, $width, $height, '#FFFFFF'); return $returnString; } }
} else { $returnxml = fetch_poodllmedialist($moduleid, $courseid, $paramone, $paramtwo, $paramthree); } break; case "poodllrsslist": header("Content-type: application/rss+xml"); echo "<rss version=\"2.0\" \n\t\t\t\txmlns:media=\"http://search.yahoo.com/mrss/\"\n\t\t\t\txmlns:fp=\"http://flowplayer.org/fprss/\">"; //moduleid/courseid/path/playerype/filearea $returnxml = fetch_poodllaudiolist($moduleid, $courseid, $paramone, $paramtwo, $paramthree, "rss", $paramfour == "true"); $returnxml .= "</rss>"; break; case "poodllaudiolist": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; //moduleid/courseid/path/playerype/filearea $returnxml = fetch_poodllaudiolist($moduleid, $courseid, $paramone, $paramtwo, $paramthree, "xml"); break; case "poodllflashcards": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; $returnxml = fetch_poodllflashcards($courseid, $paramone); break; case "poodllflashcardsconvert": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; $returnxml = fetch_poodllflashcardsconvert($courseid, $paramone); break; case "dirlist": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; $returnxml = fetch_dirlist($courseid, $paramone);
header("Content-type: text/html"); $returnxml = fetch_poodllcastdata_applet($courseid); break; case "poodllcastjnlpapplet": header("Content-type: text/html"); $returnxml = fetch_poodllcastdata_jnlpapplet($courseid); break; case "poodllmedialist": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; $returnxml = fetch_poodllmedialist($courseid, $paramone, $paramtwo); break; case "poodllaudiolist": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; $returnxml = fetch_poodllaudiolist($courseid, $paramone, $paramtwo); break; case "poodllflashcards": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; $returnxml = fetch_poodllflashcards($courseid, $paramone); break; case "poodllflashcardsconvert": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; $returnxml = fetch_poodllflashcardsconvert($courseid, $paramone); break; case "dirlist": header("Content-type: text/xml"); echo "<?xml version=\"1.0\"?>\n"; $returnxml = fetch_dirlist($courseid, $paramone);