play_qt_file in forum_fn.js : still useful?

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
User avatar
Big Monstro
Registered User
Posts: 47
Joined: Tue Nov 15, 2016 5:42 pm

play_qt_file in forum_fn.js : still useful?

Post by Big Monstro » Wed Feb 08, 2017 10:13 pm

Hello,

In addition to many new features, phpBB 3.2 removes the outmoded media file formats support, such as WM, RM et QuickTime. Therefore, the size of the template file attachment.html significantly dropped (from 6278 bytes in phpBB 3.1.10 proSilver to 2423 bytes in phpBB 3.2.0).

However, I noticed the JavaScript function play_qt_file is still in the forum_fn.js : what's the point?

Code: Select all

/**
* Play quicktime file by determining it's width/height
* from the displayed rectangle area
*/
function play_qt_file(obj)
{
	var rectangle = obj.GetRectangle();

	if (rectangle)
	{
		rectangle = rectangle.split(',')
		var x1 = parseInt(rectangle[0]);
		var x2 = parseInt(rectangle[2]);
		var y1 = parseInt(rectangle[1]);
		var y2 = parseInt(rectangle[3]);

		var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
		var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
	}
	else
	{
		var width = 200;
		var height = 0;
	}

	obj.width = width;
	obj.height = height + 16;

	obj.SetControllerVisible(true);

	obj.Play();
}
Best regards,
Big Monstro

Post Reply

Return to “[3.2.x] Styles Support & Discussion”