Dear Diary,
Browser compatibility is the bane of my life.
Working on the upload system atm for SilverstreamTV . Uploading works fine, had a few teething issues as i have stated in previous posts. I am currently working on deploying and developing the system on a live server which is quite a big deal bare in mind 3 months ago i didn't know how to code javascript or php. let alone combine it with as3, html, css and mysql.
So after developing the...upload widgets i am now using their original upload system to create an up to date easier to use and hopefully more aesthetically pleasing uploading and modifying tool.
The past few days i have been working on the database submissions and edit section. The issue came about when trying to upload a new thumbnail. The thumbnail generator takes in the video name via ExternalInterface:
var flashvariable = window.document.swfid;
flashvariable.changeText("hello" + orvariablename);
window.location ="#";
this sends the variable (which would be my video name) to the thumbnail generator which would kick start the widget.
you may think whats the issue....well I'm not using a button in my edit page, i need the thumbnail generator to load when the page loads, so it needs to insert the variable straight away....i thought it was an easy onload function. Well different browsers deal with code differently i don't know the ins an outs of it. But i had to test each browser with different solutions.
window.onload worked fine in IE, Opera and Navigator.
so we are left with Firefox, Chrome and Safari.....and also you need to get javascript to find out which browser the visitor is using.
if you check for safari before you check for google chrome, it will for some reason result in an alert saying your using safari (if you enable the alerts) (see below) but this is how i got it to work.
window.onload function cross browser Internet Explorer, Firefox, Safari, Opera, Chrome and lets not forget Navigator....
// detect browser and act accordingly
if (navigator.userAgent.indexOf("MSIE") != -1) {
//alert("You are running Microsoft Internet Explorer.");
window.onload=chosenFunction; // IE Works
}else if (navigator.userAgent.indexOf("Firefox") != -1) {
//alert("You are running FireFox.");
if (document.addEventListener) // Firefox Works
{
document.addEventListener("DOMContentLoaded", chosenFunction, false); // Call chosenFunction in Firefox
}
}else if (navigator.userAgent.indexOf("Navigator") != -1) {
//alert("You are running Netscape.");
window.onload=chosenFunction; // Navigator works
}else if (navigator.userAgent.indexOf("Opera") != -1 ) {
//alert("You are running Opera.");
window.onload=chosenFunction; // Opera Works :)
}else if (navigator.userAgent.indexOf("Chrome") != -1 ) {
//alert("You are running Chrome.");
setTimeout(chosenFunction, 300); // Google Chrome Works:)
}else if (navigator.userAgent.indexOf("Safari") != -1 ) {
//alert("You are running Safari."); // Safari Works
setTimeout(chosenFunction, 500);
}else {
alert("You are running some odd-ball browser.");
}
function chosenFunction(){
// do stuff
}
So now i have done the "not as easy as it should have been" thumbnail editor... i am now free to continue with the upload system...... wish me luck!
I am a student at Plymouth University, this is the blog for my placement year at SilverstreamTV
Friday, 1 October 2010
Friday, 17 September 2010
4.Week 7
Dear Diary,
Im sorry I seem to have neglected you. It has been 3 weeks ish since my last post. Progress so far..
All bugs have been fixed on the uploader for Flashpoint2, when ovewriting a video on upload it is no longer saved into the "Large Image" folder. I had a sudden brain wave a couple of days ago. My issue was when the php refered back to the flash to check if it was ok to overight the file. The extension wasnt sent back to the php so it through my verification off. To solve this issue i kept the extension in a session variable solving the issue and finally fixing a problem i have had for weeks. It just goes to show you if you have a problem which you cant solve at the moment, leave it and come back to it with a clear head.
The game i have been working on is nearing its climax, pretty much all the elements are in place. The maze is constructed, almost all the video elements work and the models look....well ok... good enough for a prototype. Take a look:
The only issue with the game i have at the moment is when you go to the scissors or saw in the game a video is supposed to come up and ask you why you need them.....the video comes up, but no sound is present. I have changed the volume, set to awake, asked it to loop to no avail. I like to think its unities problem.
My role in the companie diversified this week. With SkillsCymru coming up (from today through to Saturday) we were in need of some video questions about careers to add to our footage and enable students from further affar to ask questions which would then be answered by industry proffessionals. The clips chosen will become part of the final piece which will be present on the SkillsCymru website.
I was asked on Monday if i wanted to take up the challenge, so i set about researching different colleges in the north of wales, a few of which had not even started term. Long story cut short wit help of work experience attende Emma we managed to get 2 colleges to upload their footage to youtube and send us the links. I am awaiting the result from the team.....
Im sorry I seem to have neglected you. It has been 3 weeks ish since my last post. Progress so far..
All bugs have been fixed on the uploader for Flashpoint2, when ovewriting a video on upload it is no longer saved into the "Large Image" folder. I had a sudden brain wave a couple of days ago. My issue was when the php refered back to the flash to check if it was ok to overight the file. The extension wasnt sent back to the php so it through my verification off. To solve this issue i kept the extension in a session variable solving the issue and finally fixing a problem i have had for weeks. It just goes to show you if you have a problem which you cant solve at the moment, leave it and come back to it with a clear head.
The game i have been working on is nearing its climax, pretty much all the elements are in place. The maze is constructed, almost all the video elements work and the models look....well ok... good enough for a prototype. Take a look:
The only issue with the game i have at the moment is when you go to the scissors or saw in the game a video is supposed to come up and ask you why you need them.....the video comes up, but no sound is present. I have changed the volume, set to awake, asked it to loop to no avail. I like to think its unities problem.
My role in the companie diversified this week. With SkillsCymru coming up (from today through to Saturday) we were in need of some video questions about careers to add to our footage and enable students from further affar to ask questions which would then be answered by industry proffessionals. The clips chosen will become part of the final piece which will be present on the SkillsCymru website.
I was asked on Monday if i wanted to take up the challenge, so i set about researching different colleges in the north of wales, a few of which had not even started term. Long story cut short wit help of work experience attende Emma we managed to get 2 colleges to upload their footage to youtube and send us the links. I am awaiting the result from the team.....
Thursday, 26 August 2010
3.Week 4
Dear Diary,
After this week I would have completed a month at SilverstreamTV. New exciting projects are coming a foot and Pre-development and exploration is the key.
Almost at the point of completing the upload system for Flashpoint2, a few niks here and there have been causing issues mainly due to the way i coded the system. Last two issues i had left to fix were the saving of an "id" number for the event the video was being uploaded for, the form kept returning a value of "0", after looking through my code it was a simple miss reference on my part calling an element that didnt exist, but unline flash php doesnt seem to give back "null object references" which would have saved me a lot of hassle. Will be the first place i look next time.
My second issue is the image/video flash uploader interacting with php. The uploader was set up to send the filename with full extension to php, I modified the php to section off and check the extension and send the files to seperate folders depending on type. The issue i have been having has been with the overwrite function which does not send the extension so the video is saved straight into the image folder, should be a quick fix though i will have another look into it today.
Now for the exciting developments, I have been asked to explore the world of Unity3D a 3D gaming engine built with the capability to export to multiple platforms from Wii to pc and now even to iPhone.
Unity3D can be coded using Javascript, C# or Boo(Python-inspired syntax) since i have some base knowledge of Javascript thats the route i plan on going.
For ease of use Unity3D is brilliant, there are so many facilities available online for learning how to use it. Unity itself has free tutorials and files for your learning purposes and getting started is quick and easy. Also a very good thing about Unity is the fact that for the base package it is free and you get a 30-day pro trial when you download, so there is no excuse.
After this week I would have completed a month at SilverstreamTV. New exciting projects are coming a foot and Pre-development and exploration is the key.
Almost at the point of completing the upload system for Flashpoint2, a few niks here and there have been causing issues mainly due to the way i coded the system. Last two issues i had left to fix were the saving of an "id" number for the event the video was being uploaded for, the form kept returning a value of "0", after looking through my code it was a simple miss reference on my part calling an element that didnt exist, but unline flash php doesnt seem to give back "null object references" which would have saved me a lot of hassle. Will be the first place i look next time.
My second issue is the image/video flash uploader interacting with php. The uploader was set up to send the filename with full extension to php, I modified the php to section off and check the extension and send the files to seperate folders depending on type. The issue i have been having has been with the overwrite function which does not send the extension so the video is saved straight into the image folder, should be a quick fix though i will have another look into it today.
Now for the exciting developments, I have been asked to explore the world of Unity3D a 3D gaming engine built with the capability to export to multiple platforms from Wii to pc and now even to iPhone.
Unity3D can be coded using Javascript, C# or Boo(Python-inspired syntax) since i have some base knowledge of Javascript thats the route i plan on going.
For ease of use Unity3D is brilliant, there are so many facilities available online for learning how to use it. Unity itself has free tutorials and files for your learning purposes and getting started is quick and easy. Also a very good thing about Unity is the fact that for the base package it is free and you get a 30-day pro trial when you download, so there is no excuse.
Tuesday, 17 August 2010
2. Week 3 begins
Dear Diary,
This is the third week at SilverstreamTV , began with the fearful thought of databasing and building flashpoint2. The upload and store facility for SilverstreamTV's videos and thumbnails. First started with a "quick" layout sculpturing of the upload page deciding to go with a purely DIV based design. Later deciding that there is nothing wrong with the straight edge and ease of the solid structure of tables. Would never of combined the two in normal circumstance but if it works and works well "there is no point in over complicating things". So using notepad++ no hint of Dreamweaver here.
Once the main structure was down there was the case of quickly constructing the database using php and MySQL then attaching the form to a php file. yea easy as that...hmm. Had a few issues with the fact i kept forgetting to clear my cache and being a fresher at php and MySQL but once i got past a few teething issues the foundations were down. There was then the case of sorting out the checkboxes so they actually gave back values whether they were ticked or not which was a quick "if null else" statement and the base php was done.
Next Is the javascript and flash connections. The uploader needed to tell the form what the name and format the video was uploaded in. Then the Javascript needed to send that data to the thumbnail creator so it has a source to play ready for the thumbnail screenshots. This is all using "External Interface" which allows you to pass values either way two good resources for finding out how to do this were http://simplistika.com/ and http://blog.deconcept.com/code/externalinterface.html . That is one of the beauties of the internet, learn useful pieces of code and they post them up online to solve issues other people are having. So far i have successfully got to the stage where the video uploads the thumnail player plays, now i need to send the address of the thumnail to the form ready to save into the database. Which is hopefully just a duplicate of the uploaders system but when is anything that easy....
This is the third week at SilverstreamTV , began with the fearful thought of databasing and building flashpoint2. The upload and store facility for SilverstreamTV's videos and thumbnails. First started with a "quick" layout sculpturing of the upload page deciding to go with a purely DIV based design. Later deciding that there is nothing wrong with the straight edge and ease of the solid structure of tables. Would never of combined the two in normal circumstance but if it works and works well "there is no point in over complicating things". So using notepad++ no hint of Dreamweaver here.
Once the main structure was down there was the case of quickly constructing the database using php and MySQL then attaching the form to a php file. yea easy as that...hmm. Had a few issues with the fact i kept forgetting to clear my cache and being a fresher at php and MySQL but once i got past a few teething issues the foundations were down. There was then the case of sorting out the checkboxes so they actually gave back values whether they were ticked or not which was a quick "if null else" statement and the base php was done.
Next Is the javascript and flash connections. The uploader needed to tell the form what the name and format the video was uploaded in. Then the Javascript needed to send that data to the thumbnail creator so it has a source to play ready for the thumbnail screenshots. This is all using "External Interface" which allows you to pass values either way two good resources for finding out how to do this were http://simplistika.com/ and http://blog.deconcept.com/code/externalinterface.html . That is one of the beauties of the internet, learn useful pieces of code and they post them up online to solve issues other people are having. So far i have successfully got to the stage where the video uploads the thumnail player plays, now i need to send the address of the thumnail to the form ready to save into the database. Which is hopefully just a duplicate of the uploaders system but when is anything that easy....
Thursday, 12 August 2010
1. In the Beginning
Dear Diary,
This week has been a good one, met the team which I will be working with over the next 12 months. A selection of experienced professionals from the world of broadcast and TV. My line manager is Alex Byrd, IT manager and multi-media developer at SilverstreamTV with experience throughout the media industry.
SilverstreamTV as a company, works on web video both live and recorded supplying intricate video delivery systems for the world wide web. Filming at many events such as 'World Skills UK', 'Home Building and Renovating Show', 'National Home Improvement Show', ' Buisnes Travel Show', 'Shetland round Britain and Ireland Race', 'Subcon 2010' and 'Dorset County Show.
With a lot more people wanting their events recorded and/or streamed live SilverstreamTV have the technology and the know how to deliver. A thriving and dynamic team made up of multi skilled members has allowed the company to grow with the industry.
This placement is the perfect opportunity for me to develop in a variety of skill areas and see how the industry works from the inside. From recording to production to the coded fabric which holds the back-end together.
My main role is a developer, working on the facilities which will make uploading the content easier.
First task is to create a thumbnail creator, This will be created primarily in flash. The idea is that to prevent the need for the video producers to have to copy a section of video resize and upload individually. Once there video is uploaded, it will play through the player, the user can stop at a point and press a button. The thumbnail and larger image will be created and saved in a database ready to be implemented in the player.
The program is currently using flash and php and will eventually implement the use of databases.
This week has been a good one, met the team which I will be working with over the next 12 months. A selection of experienced professionals from the world of broadcast and TV. My line manager is Alex Byrd, IT manager and multi-media developer at SilverstreamTV with experience throughout the media industry.
SilverstreamTV as a company, works on web video both live and recorded supplying intricate video delivery systems for the world wide web. Filming at many events such as 'World Skills UK', 'Home Building and Renovating Show', 'National Home Improvement Show', ' Buisnes Travel Show', 'Shetland round Britain and Ireland Race', 'Subcon 2010' and 'Dorset County Show.
With a lot more people wanting their events recorded and/or streamed live SilverstreamTV have the technology and the know how to deliver. A thriving and dynamic team made up of multi skilled members has allowed the company to grow with the industry.
This placement is the perfect opportunity for me to develop in a variety of skill areas and see how the industry works from the inside. From recording to production to the coded fabric which holds the back-end together.
My main role is a developer, working on the facilities which will make uploading the content easier.
First task is to create a thumbnail creator, This will be created primarily in flash. The idea is that to prevent the need for the video producers to have to copy a section of video resize and upload individually. Once there video is uploaded, it will play through the player, the user can stop at a point and press a button. The thumbnail and larger image will be created and saved in a database ready to be implemented in the player.
The program is currently using flash and php and will eventually implement the use of databases.
Subscribe to:
Posts (Atom)