main: get MIME type for play page to determine which player to load

Issue #33 resolved
Trek Hopton created an issue

play.html needs to know the MIME type of the media that it should play so that it can load the correct player.

One approach we could take is to add a Mime field to the pagedata struct (main.go). Then add a call to the data store in the playHandler function (video.go) so we can populate this field.

Comments (6)

  1. Trek Hopton reporter

    Another way we could do this is to add another value to the query when requesting the play page, ie. type=H264 or type=x-motion-jpeg to load the respective player. This would remove the need to get data from the datastore again just to check the mime type.

  2. Trek Hopton reporter

    @Alan Noble @Saxon Milton @Scott Barnard I’m leaning towards the second option since it will save requesting data from the store again only to get the Mime type. What are your thoughts?

  3. Trek Hopton reporter

    Yes I think that parameter can be used. So the search page will produce links that have eg. … out=x-motion-jpeg … then the player page can read that parameter and switch it to m3u before passing it onto the players.

  4. Log in to comment