Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 144 lines (101 sloc) 5.146 kb
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
1 Panorama PHP
2 ============
3
4 What is this!
5 --------------
6
c7cedfba »
2011-06-10 Rewrited README file
7 With this wrapper class you can manage any video service in a uniformed and
8 unique way. You only need the URL from the video service you are going to use.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
9
10 A quick example:
11
c7cedfba »
2011-06-10 Rewrited README file
12 To include [this video](http://www.youtube.com/watch?v=HziGOzKOb9w&feature=player_embedded) in
13 [a post](http://www.retrincos.info/video/2011/04/27/2011042717512600207.html) you only need to know the
14 url of the video. With Panorama-PHP API you get this information:
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
15
16 $video = new \Panorama\Video("http://www.youtube.com/watch?v=GPQnbtldFyo")
17 $video.getTitle() => "paradon del portero"
18 $video.getThumbnail() => "http://i4.ytimg.com/vi/GPQnbtldFyo/default.jpg"
19 $video.getEmbedUrl() => "http://www.youtube.com/v/GPQnbtldFyo"
20 $video.getEmbedHTML()(width, height) => "<object [...]</object>"
21 $video.getFLV() => "http://...flv"
22 # all together :)
23 $video.getVideoDetails(width, height) => {
24 'title' => ...,
25 'thumbnail' => ...,
26 'embed_url' => ...,
27 'embed_html' => ...,
28 'flv' => ...
29 }
30
31
32 Install it!
33 -----------
34
702c6235 »
2011-06-03 Fixed some text in README file
35 1. Just put in one of your include_path folders, and make sure to use an
36 PSR-0-compatible autoloader.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
37
38 Dependencies
39 ------------
34724e4f »
2012-01-03 Updated REAME file with new API changes and new behat tests
40 This library only depends on PHP 5.3, you have to use namespaces and some other goodies of 5.3 version.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
41
c7cedfba »
2011-06-10 Rewrited README file
42 Please __don't ask for PHP < 5.3 support__, you shouldn't use PHP 5.2.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
43
44 Use it!
45 -------
46
c7cedfba »
2011-06-10 Rewrited README file
47 The idea is make it as simple as possible. For a URL video like <http://vimeo.com/1785993>:
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
48
49 $video = new \Panorama\Video("http://vimeo.com/1785993")
50
c7cedfba »
2011-06-10 Rewrited README file
51 Then you have methods to know information about the video in your application.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
52
c7cedfba »
2011-06-10 Rewrited README file
53 - __getTitle:__ A method to know the title of the video of the service.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
54
55 $video.getTitle()
56 => "Beached"
57
58 - __getService:__ A method to know the name of the video provider service.
59
60 $video.getService()
61 => "Vimeo"
62
63 - __getThumbnail:__ An image representation of the video. Each service has a different size, but... it works :)
64
65 $video.getThumbnail()
66 => "http://bc1.vimeo.com/vimeo/thumbs/143104745_640.jpg"
67
68 - __getEmbedUrl:__ The url (with flashvars) of the video player.
69
70 $video.getEmbedUrl()
71 => "http://vimeo.com/moogaloop.swf?clip_id=1785993 [...] &show_portrait=1"
72
73 - __getEmbedHTML(width, height):__ Uses the embed\_url to build an oembed string. The default width x height is 425 x 344, but we can specify a different one.
74
75 $video.getEmbedHTML(400, 300)
76 => "<object width='400' height='300'><param name='mo [...] 300'></embed></object>"
77
c7cedfba »
2011-06-10 Rewrited README file
78 - __getFLV:__ Gets the flv url. Not all the services has this option. Remember that
79 in some services the flv url expires and in their terms don't allow using the
80 flv without its player.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
81
82 $video.getFLV
83 => "http://www.vimeo.com/moogaloop/play/clip:1785993/ [...] 8ee400/video.flv"
84
c7cedfba »
2011-06-10 Rewrited README file
85 - __getVideoDetails(width, height):__ All together :), returns all the previous elements
86 in a hash. Width and height can be specified to build the embed\_html.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
87
88 $video.getVideoDetails()
89 => "array( [...] )"
90
91
92 Supported services
93 ------------------
94
95 At this moment we support the following video services:
96
97 - [Youtube](http://www.youtube.com/)
98 - [Vimeo](http://vimeo.com/)
99 - [Flickr (videos)](http://flickr.com/)
100 - [Metacafe](http://metacafe.com/)
101 - [Dailymotion](http://dailymotion.com/)
102 - [Collegehumor](http://collegehumor.com/)
103 - [Blip.tv](http://blip.tv/)
104 - [Myspace](http://vids.myspace.com/)
105 - [11870.com](http://11870.com/)
106 - [Marca.tv](http://www.marca.tv/)
107 - [Dalealplay](http://www.dalealplay.com/)
108 - [RuTube](http://www.rutube.ru/)
109
110 Broken services
111 ---------------
112
c7cedfba »
2011-06-10 Rewrited README file
113 These services were included in this API but, due changes in their website, don't work
114 anymore. Any patch for fixing them are welcome. ;)
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
115
34724e4f »
2012-01-03 Updated REAME file with new API changes and new behat tests
116 - [Ted Talks](http://www.ted.com/talks/)
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
117 - [Qik](http://qik.com/)
118 - [MTV](http://www.mtvhive.com/)
119
c7cedfba »
2011-06-10 Rewrited README file
120 If you detect new broken services by running the tests please let me know.
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
121
122 We are always open to incude new services.
123
34724e4f »
2012-01-03 Updated REAME file with new API changes and new behat tests
124 Test it!
125 --------
126 Help us to mantain this library updated. Run our behaviour tests with behat to
127 give us feedback about what services don't work anymore.
128
129 For running tests:
130
131 1. Install in your system Behat: http://docs.behat.org/quick_intro.html#method-1-pear
132 2. Install Symfony 2 ClassLoader: http://pear.symfony.com/
133 3. By using your terminal go to the features/ folder
134 4. And simply run behat from there: behat
135
d5a03cc7 »
2012-01-03 Fix typo in README file
136 Build Status
137 ------------
138 [<img src="https://secure.travis-ci.org/frandieguez/Panorama-PHP.png"/>](http://travis-ci.org/frandieguez/Panorama-PHP)
17e1ed89 »
2012-01-03 Added travis link to readme file
139
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
140 And... what else?
141 -----------------
c7cedfba »
2011-06-10 Rewrited README file
142 If you find a bug or want to suggest a new video service, please let us know in [a ticket](http://github.com/frandieguez/panorama-php/issues).
ccaba6ce »
2011-06-01 Added README.markdown with explanations for this library
143
144 Thanks!!
Something went wrong with that request. Please try again.