History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5070
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: -- --
Assignee: Unassigned
Reporter: Steve O'Sullivan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Videos not playing in YouTube demo

Created: 08/Nov/07 02:38 PM   Updated: 15/Nov/07 10:49 AM
Component/s: Components - all
Affects Version/s: RingDing (4.1)
Fix Version/s: Cranberry

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 7,239
Runtime: N/A
Fix in hand: False


 Description  « Hide
Click on any video in the list and its border will turn yellow and a descriptive pane will open up, but the video never plays.

Tested in trunk r7149. Fails in IE7, swf7 and FF 2.0.0.9 and swf7.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Mamye Kratt - 09/Nov/07 04:29 PM
(wafflecone build r7137 - cranberry RC)
The changes made to the YouTube site have broken our YouTube application.

Max Carlson - 13/Nov/07 03:38 PM
Author: max
Date: 2007-11-13 14:29:20 -0800 (Tue, 13 Nov 2007)
New Revision: 7237

Modified:
   openlaszlo/trunk/demos/youtube/youtube.jsp
   openlaszlo/trunk/demos/youtube/youtube.lzx
Log:
Change 20071113-maxcarlson-3 by maxcarlson@Roboto on 2007-11-13 13:54:12 PST
    in /Users/maxcarlson/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix the youtube player

New Features:

Bugs Fixed: LPP-5070 - Videos not playing in YouTube demo

Technical Reviewer: jcrowley
QA Reviewer: promanik
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: youtube.jsp - Add support for passing the 't' parameter though to get_video.

youtube.lzx - Use proxied mode - the server helps with http redirect calls that sometimes get returned from get_video.
    

Tests: youtube.lzx mostly works now.



Modified: openlaszlo/trunk/demos/youtube/youtube.jsp
===================================================================
--- openlaszlo/trunk/demos/youtube/youtube.jsp 2007-11-13 21:56:22 UTC (rev 7236)
+++ openlaszlo/trunk/demos/youtube/youtube.jsp 2007-11-13 22:29:20 UTC (rev 7237)
@@ -10,10 +10,10 @@
 <%@ page import="org.jdom.xpath.*" %>
 <%!
 
- /* X_LZ_COPYRIGHT_BEGIN ****************************************************
- * Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
- * Use is subject to license terms. *
- * X_LZ_COPYRIGHT_END ******************************************************/
+/* X_LZ_COPYRIGHT_BEGIN ****************************************************
+ * Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+ * Use is subject to license terms. *
+ * X_LZ_COPYRIGHT_END ******************************************************/
 
 
     public String devId =
@@ -217,7 +217,8 @@
         Element resultEl =
             new Element("videoGetFlvUrlResult");
 
- String videoId = "";
+ String videoId = "";
+ String tId = "";
         while (true) {
             String line = null;
 
@@ -236,22 +237,32 @@
             if (start == -1) {
                 continue;
             } else {
- // Extract the video_id from the args line
- Pattern p = Pattern.compile("video_id:'[\\w\\d]+'?");
- Matcher m = p.matcher(line);
- if ( m.find() ) {
- videoId = (line.substring(m.start(), m.end()));
- videoId = videoId.substring(10, videoId.length()-1);
- } else {
- reportError("video_id argument not found in HTML page", result);
- return;
- }
+ // Extract the video_id from the args line
+ Pattern vidpat = Pattern.compile("video_id:'[\\w\\d]+'?");
+ Pattern tpat = Pattern.compile("t:'[\\w\\d]+'?");
+ Matcher vidmatcher = vidpat.matcher(line);
+ Matcher tmatcher = tpat.matcher(line);
+ if ( vidmatcher.find() ) {
+ videoId = (line.substring(vidmatcher.start(), vidmatcher.end()));
+ videoId = videoId.substring(10, videoId.length()-1);
+ } else {
+ reportError("video_id argument not found in HTML page", result);
+ return;
+ }
+ if ( tmatcher.find() ) {
+ tId = (line.substring(tmatcher.start(), tmatcher.end()));
+ tId = tId.substring(3, tId.length()-1);
+ } else {
+ reportError("t argument not found in HTML page", result);
+ return;
+ }
             }
 
             String url =
- "http://cache.googlevideo.com/get_video?video_id=" + videoId;
-
+ "http://www.youtube.com/get_video?video_id=" + videoId + "&t=" + tId;
+
             resultEl.setAttribute("id", videoId);
+ resultEl.setAttribute("t", tId);
             resultEl.setAttribute("url", url);
             result.setRootElement(resultEl);
 

Modified: openlaszlo/trunk/demos/youtube/youtube.lzx
===================================================================
--- openlaszlo/trunk/demos/youtube/youtube.lzx 2007-11-13 21:56:22 UTC (rev 7236)
+++ openlaszlo/trunk/demos/youtube/youtube.lzx 2007-11-13 22:29:20 UTC (rev 7237)
@@ -7,9 +7,8 @@
 <canvas
   width="100%"
   height="100%"
- proxied="false"
+ proxied="true"
 >
-
     
     <include href="av/videoutils.lzx"/>
     <include href="av/videotogglebutton.lzx"/>


_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Max Carlson - 13/Nov/07 03:42 PM
Author: max
Date: 2007-11-13 15:40:48 -0800 (Tue, 13 Nov 2007)
New Revision: 7239

Modified:
   openlaszlo/branches/wafflecone/
   openlaszlo/branches/wafflecone/demos/youtube/youtube.jsp
   openlaszlo/branches/wafflecone/demos/youtube/youtube.lzx
Log:
Merged revisions 7237 via svnmerge from
http://svn.openlaszlo.org/openlaszlo/trunk

.......
  r7237 | max | 2007-11-13 14:29:20 -0800 (Tue, 13 Nov 2007) | 26 lines
  
  Change 20071113-maxcarlson-3 by maxcarlson@Roboto on 2007-11-13 13:54:12 PST
      in /Users/maxcarlson/openlaszlo/trunk
      for http://svn.openlaszlo.org/openlaszlo/trunk
  
  Summary: Fix the youtube player
  
  New Features:
  
  Bugs Fixed: LPP-5070 - Videos not playing in YouTube demo
  
  Technical Reviewer: jcrowley
  QA Reviewer: promanik
  Doc Reviewer: (pending)
  
  Documentation:
  
  Release Notes:
  
  Details: youtube.jsp - Add support for passing the 't' parameter though to get_video.
  
  youtube.lzx - Use proxied mode - the server helps with http redirect calls that sometimes get returned from get_video.
      
  
  Tests: youtube.lzx mostly works now.
.......



Property changes on: openlaszlo/branches/wafflecone
___________________________________________________________________
Name: svnmerge-integrated
   - /openlaszlo/branches/legals:1-5746,5748-5756,5758-5770,5772-5819,5821-5860,5862-5890,5892-6065,6068-6177,6179-6228,6230-6236,6241-6266 /openlaszlo/trunk:1-3892,3894-3952,3954-4393,4395-4461,4463-4467,4469-4471,4473-5085,5087-5171,5173-5203,5205-5209,5211-5331,5333-5334,6484-6485,6487,6490-6492,6494-6495,6497,6500-6502,6504-6505,6507-6520,6531-6532,6534-6538,6540-6547,6549,6551-6558,6560-6567,6569-6581,6583-6586,6588,6590-6607,6610-6611,6613-6622,6624-6629,6632-6636,6638-6639,6641-6642,6646-6648,6653,6656-6663,6665-6669,6671-6683,6685-6686,6688-6706,6708-6715
   + /openlaszlo/branches/legals:1-5746,5748-5756,5758-5770,5772-5819,5821-5860,5862-5890,5892-6065,6068-6177,6179-6228,6230-6236,6241-6266 /openlaszlo/trunk:1-3892,3894-3952,3954-4393,4395-4461,4463-4467,4469-4471,4473-5085,5087-5171,5173-5203,5205-5209,5211-5331,5333-5334,6484-6485,6487,6490-6492,6494-6495,6497,6500-6502,6504-6505,6507-6520,6531-6532,6534-6538,6540-6547,6549,6551-6558,6560-6567,6569-6581,6583-6586,6588,6590-6607,6610-6611,6613-6622,6624-6629,6632-6636,6638-6639,6641-6642,6646-6648,6653,6656-6663,6665-6669,6671-6683,6685-6686,6688-6706,6708-6715,7237

Modified: openlaszlo/branches/wafflecone/demos/youtube/youtube.jsp
===================================================================
--- openlaszlo/branches/wafflecone/demos/youtube/youtube.jsp 2007-11-13 23:02:22 UTC (rev 7238)
+++ openlaszlo/branches/wafflecone/demos/youtube/youtube.jsp 2007-11-13 23:40:48 UTC (rev 7239)
@@ -10,10 +10,10 @@
 <%@ page import="org.jdom.xpath.*" %>
 <%!
 
- /* X_LZ_COPYRIGHT_BEGIN ****************************************************
- * Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
- * Use is subject to license terms. *
- * X_LZ_COPYRIGHT_END ******************************************************/
+/* X_LZ_COPYRIGHT_BEGIN ****************************************************
+ * Copyright 2007 Laszlo Systems, Inc. All Rights Reserved. *
+ * Use is subject to license terms. *
+ * X_LZ_COPYRIGHT_END ******************************************************/
 
 
     public String devId =
@@ -217,7 +217,8 @@
         Element resultEl =
             new Element("videoGetFlvUrlResult");
 
- String videoId = "";
+ String videoId = "";
+ String tId = "";
         while (true) {
             String line = null;
 
@@ -236,22 +237,32 @@
             if (start == -1) {
                 continue;
             } else {
- // Extract the video_id from the args line
- Pattern p = Pattern.compile("video_id:'[\\w\\d]+'?");
- Matcher m = p.matcher(line);
- if ( m.find() ) {
- videoId = (line.substring(m.start(), m.end()));
- videoId = videoId.substring(10, videoId.length()-1);
- } else {
- reportError("video_id argument not found in HTML page", result);
- return;
- }
+ // Extract the video_id from the args line
+ Pattern vidpat = Pattern.compile("video_id:'[\\w\\d]+'?");
+ Pattern tpat = Pattern.compile("t:'[\\w\\d]+'?");
+ Matcher vidmatcher = vidpat.matcher(line);
+ Matcher tmatcher = tpat.matcher(line);
+ if ( vidmatcher.find() ) {
+ videoId = (line.substring(vidmatcher.start(), vidmatcher.end()));
+ videoId = videoId.substring(10, videoId.length()-1);
+ } else {
+ reportError("video_id argument not found in HTML page", result);
+ return;
+ }
+ if ( tmatcher.find() ) {
+ tId = (line.substring(tmatcher.start(), tmatcher.end()));
+ tId = tId.substring(3, tId.length()-1);
+ } else {
+ reportError("t argument not found in HTML page", result);
+ return;
+ }
             }
 
             String url =
- "http://cache.googlevideo.com/get_video?video_id=" + videoId;
-
+ "http://www.youtube.com/get_video?video_id=" + videoId + "&t=" + tId;
+
             resultEl.setAttribute("id", videoId);
+ resultEl.setAttribute("t", tId);
             resultEl.setAttribute("url", url);
             result.setRootElement(resultEl);
 

Modified: openlaszlo/branches/wafflecone/demos/youtube/youtube.lzx
===================================================================
--- openlaszlo/branches/wafflecone/demos/youtube/youtube.lzx 2007-11-13 23:02:22 UTC (rev 7238)
+++ openlaszlo/branches/wafflecone/demos/youtube/youtube.lzx 2007-11-13 23:40:48 UTC (rev 7239)
@@ -7,9 +7,8 @@
 <canvas
   width="100%"
   height="100%"
- proxied="false"
+ proxied="true"
 >
-
     
     <include href="av/videoutils.lzx"/>
     <include href="av/videotogglebutton.lzx"/>


_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Steve O'Sullivan - 15/Nov/07 10:49 AM
Most videos now play in Youtube demo: r7249, Win XP SP 2 IE7, OS X 10.4.10 Safari 2.0.4 and FF 2.0.0.9.

Opening new bug for RingDing fix.