Page 2 of 4

Re: HTML5 Video Player with jQuery

Posted: Tue Oct 13, 2015 5:40 pm
by JHPJHP
Updated:
- TurnJSBook.pb, TurnJSBook_Create.pb

The update brings dynamic resizing to the page turning effect. Taking into consideration aspect ratios to maximize the fit of the book to your screen.
- create a new "Book" folder using the file TurnJSBook_Create.pb, pointing it to the folder TestFiles\FuturesEnd\
- next run the example TurnJSBook.pb pointing it at the newly created file TestFiles\Book1\FlipBook.div

It's worth noting for best results the first and last pages should have an orientation type of portrait, otherwise those images may be cropped or pressed.

Image

----------------------------------------------------------

Updated:
- VideoPlayer.pb, videoplayer.pbi

The update combines a JavaScript listener-event with the PureBasic Maximize / Restore events to remember a videos last position when switch between full-screen and normal view.

Remove window borders (excluding title bar) with the video players "Full screen" button. Optionally the "Zoom in" button will remove the black video borders.

Image

Re: JavaScript Frameworks from PureBasic

Posted: Wed Oct 14, 2015 9:48 am
by Fred
This is really great work !

Re: Embed JS Framework into PureBasic

Posted: Fri Oct 16, 2015 12:23 am
by JHPJHP
Hi Fred,

Thank you for finding the time in your busy schedule to comment, it means a lot.

------------------------------------------------

Updated:
- added another framework: Flot Charts
- added 2 examples
-- FlotPieChart.pb, flotpiechart.pbi
-- FlotThresholdChart.pb, flotthresholdchart.pbi
- renamed the video player examples to better reflect their origin (includes minor improvements)

The new examples FlotPieChart.pb and FlotThresholdChart.pb demonstrate only a couple of the many charts available (see website for details).

Image

Re: Embed JS Framework into PureBasic

Posted: Fri Oct 16, 2015 4:39 am
by IdeasVacuum
Hi JHPJHP

...working late but couldn't resist trying out your latest and greatest. I'm doing something wrong though:

1) Run TurnJSBook_Create.pb, Select the folder 'FuturesEnd' - success
2) Run TurnJSBook.pb, Select newly created book FlipBook.div - displays book, but only blank pages.

I'm using Win7 x86, PB5.31 32bit.

Re: Embed JS Framework into PureBasic

Posted: Fri Oct 16, 2015 1:20 pm
by JHPJHP
Hi IdeasVacuum,

First let me say thank you for posting your results.

blueb also reported this same problem, but I thought I had it worked out. Can you provide me a link to a compressed copy of the Book1 (TestFiles/Book1/) folder created after running TurnJSBook_Create.pb.

Thank you again.

Re: Embed JS Framework into PureBasic

Posted: Fri Oct 16, 2015 3:31 pm
by IdeasVacuum
Here we go:
Book1.zip

Re: Embed JS Framework into PureBasic

Posted: Fri Oct 16, 2015 4:22 pm
by JHPJHP
Hi IdeasVacuum,

Thank you for the upload, I now know what the problem was.
- needed quotes when the image path included spaces

Thank you again, without your feedback it would not have been resolved.

----------------------------------------------------

Updated:
- fixed the problem posted by IdeasVacuum

Re: Embed JS Framework into PureBasic

Posted: Fri Oct 16, 2015 6:49 pm
by IdeasVacuum
.... I should have thought of that myself Image

Re: Embed JS Framework into PureBasic

Posted: Sat Oct 17, 2015 4:31 am
by JHPJHP
Updated:
- renamed all the examples and includes
- added 2 examples
-- Flot_RealTime.pb, flot_realtime.pbi
-- Flot_Stacking.pb, flot_stacking.pbi

Unlike the other Flot examples Flot_RealTime.pb isn't linked to a PureBasic dataset, it's receiving random data from a JavaScript file.

Image

Re: Embed JS Framework into PureBasic

Posted: Mon Oct 19, 2015 8:24 pm
by JHPJHP
Updated:
- added 1 example
-- Flot_Selection.pb, flot_selection.pbi

Image

Re: Embed JS Framework into PureBasic

Posted: Wed Oct 21, 2015 12:18 am
by JHPJHP
Updated:
- added 1 example
-- AS3_Webcam.pb, as3_webcam.pbi

An example that brings your webcam to the WebGagdget.
- includes a snapshot option

NB*: Currently the getUserMedia function is not supported in IE, so the only way to host a webcam in a WebGadget is using adobe flash.

Image

Re: Embed JS Framework into PureBasic

Posted: Wed Oct 21, 2015 4:39 am
by JHPJHP
Updated the Flot chart examples.
- added a button to each example to save the charts to a JPEG file

Updated the example AS3_Webcam.pb, as3_webcam.pbi.
- set width / height (no error checking against available settings)
-- BuildCam(WebcamFolder, 320, 240)
- take a snapshot (previous image is replaced)
- save snapshot to a JPEG file
- save snapshot to a base64 encoded file

NB*: Keeping inline with the other examples, the new options are a mix of PureBasic and JavaScript working together.

Re: Embed JS Framework into PureBasic

Posted: Sat Oct 24, 2015 7:26 am
by JHPJHP
Hadrianus wrote:Hi JHPJHP,

I love your JS-magic for Purebasic. Please take a look at ViewerJS.org, it's a fully independent PDF-viewer and free to use. I tried to connect this with PB. Perhaps you will bring this viewer to PB one day.
Hi Hadrianus,

Thank you, I'm glad you liked it.

While I'm not usually one for taking requests, the PDF viewer demonstrates the extensibility of this project in a new way.

I looked at ViewerJS.org, but it was a bit bloated so I decided to go straight to the source: PDF.js.

----------------------------------------------------------------------

Updated:
- added 1 example
-- PDFJS_Viewer.pb

An embedded PDF viewer with a nice interface in a resizable PureBasic Window / WebGadget: PDF.js Demo

Image.

Re: Embed JS Framework into PureBasic

Posted: Sun Oct 25, 2015 7:56 pm
by Hadrianus
Thanks a lot JHPJHP !
Also with window api stuff, I have to study this.

Re: Embed JS Framework into PureBasic

Posted: Thu Jan 07, 2016 3:41 am
by JHPJHP
Hi Hadrianus,

You're very much welcome, I hope it proves useful.

-------------------------------------------

Applied small updates and improvements.
- I noticed when running the examples consecutively, at various times the HTML5 registry update failed

I don't believe this to be more than a locked process due to the examples using the same temp executable; this should not occur in a production environment.
- added a trap to confirm whether or not the registry update was successful

-------------------------------------------

Applied some minor updates to the existing examples, nothing worth documenting.