Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More reliable altSource logic following VideoJS source array #120

Closed
kontur opened this issue Apr 29, 2014 · 8 comments
Closed

More reliable altSource logic following VideoJS source array #120

kontur opened this issue Apr 29, 2014 · 8 comments

Comments

@kontur
Copy link
Contributor

kontur commented Apr 29, 2014

Hey,

I found the altSource parameter somewhat unreliable for what file type gets picked and clumsy for when you want to actually provide three file types, like you can do in VideoJS, e.g.

vjs.src([
    { type: "video/webm", src: video.file + ".webm" },
    { type: "video/mp4", src: video.file + ".mp4" },
    { type: "video/ogg", src: video.file + ".ogv" }
]);

I've made a rather opinionated hack for a project I am working on, where the BV.show() function accepts this kind of array as source and passes it along to the playVideo() method. If this is a desired feature for the main source I am more than willing to put together a PR for this.

Any thoughts?

@johnpolacek
Copy link
Owner

Sounds good. PR it up!

@chriskostelec
Copy link

That would be awesome, I was just going to public an issue requesting that BigVideo.js would add the source type (i.e. type: "video/webm") in the outputted code. I'm having the issue where I have a webm version first and Safari tries to play it... which it can't unless the user has webm installed.

Also, if you wanna pass that hack along in the mean time I'd be super stoked. ;)

@qbunt
Copy link

qbunt commented May 20, 2014

Definitely interested in this for a current project as well, any idea when that PR will be up?

@ckostelec
Copy link

@qbunt I worked with some programmers at my business and we figured out a messy and hacky way to do what we needed. It's pretty similar to what @kontur described.

We've changed how bigvideo.js somewhat substantially so I don't think these changes could be merged as-is... but it may suffice for now. It doesn't apply the type tag, but seems to detect properly. I'm not a programmer so if I knew how to clean it up I'd submit a PR with a proper version.

See: https://gist.github.com/ckostelec/0f72b0a721081da25153

Implemented on: http://cws.net

I am reasonably confident it's working, let me know if it's not.

@kontur
Copy link
Contributor Author

kontur commented Jul 6, 2014

Sorry for the long absence from this issue.

What do you suggest for the following problem: If changing BigVideo.show to accept above example array of video objects like videoJS does natively, how will it be possible to distinguish this array from an array for a playlist?
Should playing a a playlist be separated into its own function, thus making it easier to distinguish the following input in BigVideo.show: String for imagefile, String for videofile, Array of objects for multiple videofiles. Whereas the playlist function would take an array of any of the above to show in sequence.

What do you think?

@johnpolacek
Copy link
Owner

Sounds right to me

@kontur
Copy link
Contributor Author

kontur commented Jul 7, 2014

I thought there used to be a way to link a pull request to an open issue, but I couldn't find it any more. Anyway: #133

@johnpolacek
Copy link
Owner

Merged in at version 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants