Hi
i am new to this language and want some help on how code for playing media player or avi player using xml and php a web page along with full controls (forward,stop,pause,play etc).

youtube vedios are easy to play on a web page using <embed></embed>

Dani AI

Generated

Quick, practical direction: build the player in the browser (HTML5 + JavaScript) and use PHP only to produce the source list, secure files, or generate streaming manifests. asked about XML and PHP; note that modern players accept HTML5 video sources (and for adaptive streaming you can use HLS or DASH — DASH uses an XML MPD manifest if you specifically need XML). hinted at the same separation of roles, and ’s conversion idea points toward preparing files in compatible formats.

A minimal HTML5 example (client-side) — drop this in your page and replace the src paths with files your PHP serves:

<video id="player" controls width="640" height="360" preload="metadata">
  <source src="/media/video.mp4" type="video/mp4">
  <source src="/media/video.webm" type="video/webm">
  Your browser does not support the video element.
</video>

How PHP fits in: serve static files (Apache/Nginx handle byte-range requests automatically, which enables seeking). If you stream files through a PHP script, implement HTTP Range handling (206 Partial Content) so the browser can seek. Use PHP to emit a JSON playlist or to generate HLS (.m3u8) or DASH (.mpd) manifests for adaptive streaming. For transcoding and preparing MP4/WebM, use a reliable tool such as FFmpeg.

Quick checklist and links:

  • Use MP4 (H.264 + AAC) as primary for widest device support; WebM as secondary.
  • If you need adaptive streaming, HLS or DASH is the right path (DASH uses XML manifests).
  • Ensure server supports byte-range requests or implement RFC-compliant range handling in PHP (RFC 7233).
  • Libraries with ready UI and cross-browser handling: Video.js or hls.js for HLS playback in non-native browsers.
  • Flash is obsolete; target HTML5. For transcoding, see FFmpeg and for video element docs see MDN video element.

This approach gives full controls, cross-browser behavior, and a clean way to use PHP where it belongs — generating sources, protecting content, and serving manifests.

Recommended Answers

All 3 Replies

To make a media player, you need flash (or something). You can't make a fully functional media player with PHP alone.

Thanks for the answer
i already have flash player and abode flash installed in my system.

i am able to embed youtube vedio and any audio on a php page..
but i need help in embedding a media player or flash player with full functionality(play,pause,forwrd,rewind etc)...
i would be thankful with any help with this...

Get a program called free studio and use video to flash.

Calum

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.